Skip to content

Update for Python 3.13 builtins.TypeError: '<' not supported between instances of 'NoneType' and 'int' #12056

@adiroiban

Description

@adiroiban

I now see there is 3.13 alpha build available on GitHub https://github.com/actions/python-versions/releases/tag/3.13.0-alpha.2-6966007093

There is this run reports from Karolina for Fedora:

https://download.copr.fedorainfracloud.org/results/@python/python3.13/fedora-rawhide-x86_64/06770350-python-twisted/builder-live.log.gz

[FAIL]
Traceback (most recent call last):
  File "/builddir/build/BUILD/twisted-twisted-23.10.0/src/twisted/trial/test/test_assertions.py", line 1599, in test_callDeprecationWithWrongMessage
    exception = self.assertRaises(
  File "/builddir/build/BUILD/twisted-twisted-23.10.0/src/twisted/trial/_synctest.py", line 430, in assertRaises
    return context._handle(lambda: f(*args, **kwargs))
  File "/builddir/build/BUILD/twisted-twisted-23.10.0/src/twisted/trial/_synctest.py", line 320, in _handle
    with self as context:
  File "/builddir/build/BUILD/twisted-twisted-23.10.0/src/twisted/trial/_synctest.py", line 355, in __exit__
    self._testCase.fail(
twisted.trial.unittest.FailTest: builtins.TypeError raised instead of FailTest:
 Traceback (most recent call last):
  File "/builddir/build/BUILD/twisted-twisted-23.10.0/src/twisted/python/util.py", line 958, in runWithWarningsSuppressed
    return f(*args, **kwargs)
  File "/builddir/build/BUILD/twisted-twisted-23.10.0/src/twisted/trial/test/test_assertions.py", line 1599, in test_callDeprecationWithWrongMessage
    exception = self.assertRaises(
  File "/builddir/build/BUILD/twisted-twisted-23.10.0/src/twisted/trial/_synctest.py", line 430, in assertRaises
    return context._handle(lambda: f(*args, **kwargs))
  File "/builddir/build/BUILD/twisted-twisted-23.10.0/src/twisted/trial/_synctest.py", line 320, in _handle
    with self as context:
--- <exception caught here> ---
  File "/builddir/build/BUILD/twisted-twisted-23.10.0/src/twisted/trial/_synctest.py", line 321, in _handle
    self._returnValue = obj()
  File "/builddir/build/BUILD/twisted-twisted-23.10.0/src/twisted/trial/_synctest.py", line 430, in <lambda>
    return context._handle(lambda: f(*args, **kwargs))
  File "/builddir/build/BUILD/twisted-twisted-23.10.0/src/twisted/trial/_synctest.py", line 1297, in callDeprecated
    warningsShown = self.flushWarnings([self.callDeprecated])
  File "/builddir/build/BUILD/twisted-twisted-23.10.0/src/twisted/trial/_synctest.py", line 1196, in flushWarnings
    if not (min(lineNumbers) <= aWarning.lineno <= max(lineNumbers)):
builtins.TypeError: '<' not supported between instances of 'NoneType' and 'int'


twisted.trial.test.test_assertions.CallDeprecatedTests.test_callDeprecationWithWrongMessage

Try to run the tests with py3.13 and see if we can fix this error.

We might not merge the py3.13 test run just yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions