Skip to content

Commit 962510c

Browse files
authored
Merge pull request #108 from warner/105-python-313-support
Work with next release of Twisted, and run tests on Python 3.13
2 parents 48b0ba3 + b4c2adc commit 962510c

File tree

5 files changed

+9
-33
lines changed

5 files changed

+9
-33
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414
name: "${{ matrix.os }}: Python ${{ matrix.python-version }}"
1515
strategy:
1616
matrix:
17-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
17+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"]
1818
os: ["ubuntu-22.04"]
1919

2020
runs-on: "${{ matrix.os }}"
2121

2222
steps:
23-
- uses: "actions/checkout@v2"
24-
- uses: "actions/setup-python@v2"
23+
- uses: "actions/checkout@v4"
24+
- uses: "actions/setup-python@v5"
2525
with:
2626
python-version: "${{ matrix.python-version }}"
2727
- run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
/.coverage
1010
/coverage.xml
1111
/.tox/
12+
venv*

src/foolscap/test/test_interfaces.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -112,33 +112,6 @@ def testInterface3(self):
112112
iface = getRemoteInterface(t)
113113
self.assertFalse(iface)
114114

115-
def testStack(self):
116-
# when you violate your outbound schema, the Failure you get should
117-
# have a stack trace that includes the actual callRemote invocation.
118-
# Sometimes the stack trace doesn't include source code (either we
119-
# have .pyc files but not .py files, or because the code is coming
120-
# from an .egg). So this test merely asserts that test_interfaces.py
121-
# is present in the trace, followed by either a source code line that
122-
# mentions callRemote, or the filename/linenumber/functionname line
123-
# that mentions callRemote.
124-
self.setupBrokers()
125-
rr, target = self.setupTarget(Target(), True)
126-
d = rr.callRemote('add', "not a number", "oops")
127-
def _check_failure(f):
128-
s = f.getTraceback().split("\n")
129-
for i in range(len(s)):
130-
line = s[i]
131-
if ("test_interfaces.py" in line
132-
and i+2 < len(s)
133-
and ("rr.callRemote" in s[i+1]
134-
or "in callRemote" in s[i+2])):
135-
return # all good
136-
print("failure looked like this:")
137-
print(f)
138-
self.fail("didn't see invocation of callRemote in stacktrace")
139-
d.addCallbacks(lambda res: self.fail("hey, this was supposed to fail"),
140-
_check_failure)
141-
return d
142115

143116
class Types(TargetMixin, unittest.TestCase):
144117
def setUp(self):

src/foolscap/test/test_logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1794,7 +1794,7 @@ def test_logprinter(self):
17941794
outmsg)
17951795
self.assertTrue("RuntimeError" in outmsg, outmsg)
17961796
self.assertTrue(": fake error" in outmsg, outmsg)
1797-
self.assertTrue("--- <exception caught here> ---\n" in outmsg, outmsg)
1797+
self.assertTrue("test_logging.py" in outmsg, outmsg)
17981798

17991799
def test_logprinter_verbose(self):
18001800
target_tubid_s = "jiijpvbge2e3c3botuzzz7la3utpl67v"

tox.ini

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py37,py38,py39,py310,py311
2+
envlist = py37,py38,py39,py310,py311,py312,py313
33
skip_missing_interpreters = True
44
minversion = 2.4.0
55

@@ -10,9 +10,11 @@ python =
1010
3.9: py39
1111
3.10: py310
1212
3.11: py311
13+
3.12: py312
14+
3.13: py313
1315

1416
[testenv]
15-
passenv = USERPROFILE HOMEDRIVE HOMEPATH PYTHONWARNINGS
17+
passenv = USERPROFILE,HOMEDRIVE,HOMEPATH,PYTHONWARNINGS
1618
usedevelop = True
1719
extras = dev
1820
deps =

0 commit comments

Comments
 (0)