Source: bpython
Version: 0.26-1
Severity: serious
User: [email protected]
Usertags: regression

Dear maintainer(s),

Your package has an autopkgtest, great. However, the test started failing around mid February 2026 [1]. Can you please investigate the situation and fix it?

The release team has announced [2] that failing autopkgtest on amd64 and arm64 are considered RC in testing.

If you believe the failure is related to the infrastructure rather than the test of the package, don't hesitate to reach out to the ci-team on IRC (#debci on oftc) or via [email protected].

Paul

PS: this bug submission was largely automated, please contact me if you think I should improve my workflow.

[1] https://ci.debian.net/packages/b/bpython/testing/amd64
[2] https://lists.debian.org/debian-devel-announce/2019/07/msg00002.html

https://ci.debian.net/packages/b/bpython/testing/amd64/69756350/

40s =================================== FAILURES =================================== 40s ___ TestInterpreter.test_getsource_works_on_interactively_defined_functions ____
 40s
40s self = <bpython.test.test_interpreter.TestInterpreter testMethod=test_getsource_works_on_interactively_defined_functions>
 40s
 40s     def test_getsource_works_on_interactively_defined_functions(self):
 40s         source = "def foo(x):\n    return x + 1\n"
 40s         i = interpreter.Interp()
 40s         i.runsource(source)
 40s         import inspect
 40s
 40s >       inspected_source = inspect.getsource(i.locals["foo"])
 40s                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 40s
 40s bpython/test/test_interpreter.py:157:
40s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 40s /usr/lib/python3.13/inspect.py:1265: in getsource
 40s     lines, lnum = getsourcelines(object)
 40s                   ^^^^^^^^^^^^^^^^^^^^^^
 40s /usr/lib/python3.13/inspect.py:1247: in getsourcelines
 40s     lines, lnum = findsource(object)
 40s                   ^^^^^^^^^^^^^^^^^^
40s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 40s
 40s object = <function foo at 0x7f09834313a0>
 40s
 40s     def findsource(object):
40s """Return the entire source file and starting line number for an object.
 40s
40s The argument may be a module, class, method, function, traceback, frame, 40s or code object. The source code is returned as a list of all the lines 40s in the file and the line number indexes a line in that list. An OSError
 40s         is raised if the source code cannot be retrieved."""
 40s
 40s         file = getsourcefile(object)
 40s         if file:
 40s             # Invalidate cache if needed.
 40s             linecache.checkcache(file)
 40s         else:
 40s             file = getfile(object)
40s # Allow filenames in form of "<something>" to pass through.
 40s             # `doctest` monkeypatches `linecache` module to enable
 40s             # inspection, so let `linecache.getlines` to be called.
40s if (not (file.startswith('<') and file.endswith('>'))) or file.endswith('.fwork'):
 40s                 raise OSError('source code not available')
 40s
 40s         module = getmodule(object, file)
 40s         if module:
 40s             lines = linecache.getlines(file, module.__dict__)
40s if not lines and file.startswith('<') and hasattr(object, "__code__"):
 40s                 lines = linecache._getlines_from_code(object.__code__)
 40s         else:
 40s             lines = linecache.getlines(file)
 40s         if not lines:
 40s >           raise OSError('could not get source code')
 40s E           OSError: could not get source code
 40s
 40s /usr/lib/python3.13/inspect.py:1082: OSError
40s ________________________ TestInterpreter.test_traceback ________________________
 40s
40s self = <bpython.test.test_interpreter.TestInterpreter testMethod=test_traceback>
 40s
 40s     def test_traceback(self):
 40s         i = Interpreter()
 40s
 40s         def f():
 40s             return 1 / 0
 40s
 40s         def gfunc():
 40s             return f()
 40s
 40s         i.runsource("gfunc()")
 40s
 40s         global_not_found = "name 'gfunc' is not defined"
 40s
 40s         if (3, 13) <= sys.version_info[:2]:
 40s             expected = (
 40s                 "Traceback (most recent call last):\n  File "
 40s                 + green('"<input>"')
 40s                 + ", line "
 40s                 + bold(magenta("1"))
 40s                 + ", in "
 40s                 + cyan("<module>")
 40s                 + "\n    gfunc()"
 40s                 + "\n    ^^^^^\n"
 40s                 + bold(red("NameError"))
 40s                 + ": "
 40s                 + cyan(global_not_found)
 40s                 + "\n"
 40s             )
 40s         elif (3, 11) <= sys.version_info[:2]:
 40s             expected = (
 40s                 "Traceback (most recent call last):\n  File "
 40s                 + green('"<input>"')
 40s                 + ", line "
 40s                 + bold(magenta("1"))
 40s                 + ", in "
 40s                 + cyan("<module>")
 40s                 + "\n    gfunc()"
 40s                 + "\n     ^^^^^\n"
 40s                 + bold(red("NameError"))
 40s                 + ": "
 40s                 + cyan(global_not_found)
 40s                 + "\n"
 40s             )
 40s         else:
 40s             expected = (
 40s                 "Traceback (most recent call last):\n  File "
 40s                 + green('"<input>"')
 40s                 + ", line "
 40s                 + bold(magenta("1"))
 40s                 + ", in "
 40s                 + cyan("<module>")
 40s                 + "\n    gfunc()\n"
 40s                 + bold(red("NameError"))
 40s                 + ": "
 40s                 + cyan(global_not_found)
 40s                 + "\n"
 40s             )
 40s
 40s         a = i.a
40s > self.assertMultiLineEqual(str(expected), str(plain("").join(a))) 40s E AssertionError: 'Trac[128 chars]39m\n gfunc()\n ^^^^^\n\x1b[31m\x1b[1mNa[67 chars]9m\n' != 'Trac[128 chars]39m\n\x1b[31m\x1b[1mNameError\x1b[0m\x1b[39m: [43 chars]9m\n'
 40s E         Traceback (most recent call last):
 40s E           File "<input>", line 1, in <module>
 40s E       -     gfunc()
 40s E       -     ^^^^^
 40s E         NameError: name 'gfunc' is not defined
 40s
 40s bpython/test/test_interpreter.py:148: AssertionError
40s =========================== short test summary info ============================ 40s FAILED bpython/test/test_interpreter.py::TestInterpreter::test_getsource_works_on_interactively_defined_functions 40s FAILED bpython/test/test_interpreter.py::TestInterpreter::test_traceback - As... 40s ============= 2 failed, 308 passed, 14 skipped, 3 xfailed in 2.05s =============

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to