--- Begin Message ---
Package: src:python-executing
Version: 2.2.0-0.3
Severity: serious
Tags: ftbfs forky sid
Dear maintainer:
During a rebuild of all packages in unstable, this package failed to build.
Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:
https://people.debian.org/~sanvila/build-logs/202512/
About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.
If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.
If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:python-executing, so that this is still
visible in the BTS web page for this package.
Thanks.
--------------------------------------------------------------------------------
[...]
debian/rules clean
dh clean --buildsystem=pybuild
dh_auto_clean -O--buildsystem=pybuild
dh_autoreconf_clean -O--buildsystem=pybuild
dh_clean -O--buildsystem=pybuild
debian/rules execute_after_dh_clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
rm -rf .mypy_cache
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
debian/rules binary
dh binary --buildsystem=pybuild
dh_update_autotools_config -O--buildsystem=pybuild
dh_autoreconf -O--buildsystem=pybuild
dh_auto_configure -O--buildsystem=pybuild
dh_auto_build -O--buildsystem=pybuild
[... snipped ...]
and node_match((ast.ListComp, ast.SetComp, ast.DictComp))
):
return
if inst_match(("CALL", "CALL_FUNCTION_EX")) and node_match(
(ast.ClassDef, ast.Call)
):
return
if inst_match(("COMPARE_OP", "IS_OP", "CONTAINS_OP")) and node_match(
ast.Compare
):
return
if inst_match("LOAD_NAME", argval="__annotations__") and node_match(
ast.AnnAssign
):
return
if (
(
inst_match("LOAD_METHOD", argval="join")
or inst_match("LOAD_ATTR", argval="join") # 3.12
or inst_match(("CALL", "BUILD_STRING"))
)
and node_match(ast.BinOp, left=ast.Constant, op=ast.Mod)
and isinstance(cast(ast.Constant, cast(ast.BinOp,
node).left).value, str)
):
# "..."%(...) uses "".join
return
if inst_match("STORE_SUBSCR") and node_match(ast.AnnAssign):
# data: int
return
if inst_match(("DELETE_NAME", "DELETE_FAST")) and node_match(
ast.Name, id=instruction.argval, ctx=ast.Del
):
return
if inst_match("BUILD_STRING") and (
node_match(ast.JoinedStr) or node_match(ast.BinOp, op=ast.Mod)
):
return
if inst_match(("BEFORE_WITH","WITH_EXCEPT_START")) and
node_match(ast.With):
return
if inst_match(("STORE_NAME", "STORE_GLOBAL"), argval="__doc__") and
node_match(
ast.Constant
):
# store docstrings
return
if (
inst_match(("STORE_NAME", "STORE_FAST", "STORE_GLOBAL",
"STORE_DEREF"))
and node_match(ast.ExceptHandler)
and instruction.argval == mangled_name(node)
):
# store exception in variable
return
if (
inst_match(("STORE_NAME", "STORE_FAST", "STORE_DEREF",
"STORE_GLOBAL"))
and node_match((ast.Import, ast.ImportFrom))
and any(mangled_name(cast(EnhancedAST, alias)) ==
instruction.argval for alias in cast(ast.Import, node).names)
):
# store imported module in variable
return
if (
inst_match(("STORE_FAST", "STORE_DEREF", "STORE_NAME",
"STORE_GLOBAL"))
and (
node_match((ast.FunctionDef, ast.ClassDef,
ast.AsyncFunctionDef))
or node_match(
ast.Name,
ctx=ast.Store,
)
)
and instruction.argval == mangled_name(node)
):
return
if False:
# TODO: match expressions are not supported for now
if inst_match(("STORE_FAST", "STORE_NAME")) and node_match(
ast.MatchAs, name=instruction.argval
):
return
if inst_match("COMPARE_OP", argval="==") and
node_match(ast.MatchSequence):
return
if inst_match("COMPARE_OP", argval="==") and
node_match(ast.MatchValue):
return
if inst_match("BINARY_OP") and node_match(
> ast.AugAssign, op=op_type_map[instruction.argrepr.removesuffix("=")]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
E KeyError: '[]'
executing/_position_node_finder.py:661: KeyError
______________________________ test_mangled_name _______________________________
def test_mangled_name():
def result(*code_levels):
code = ""
for i, level in enumerate(code_levels):
code += indent(level, " " * i) + "\n"
tree = ast.parse(code)
for parent in ast.walk(tree):
for child in ast.iter_child_nodes(parent):
child.parent = parent
tree_names = {
mangled_name(n)
for n in ast.walk(tree)
if isinstance(
n,
(
ast.Name,
ast.Attribute,
ast.alias,
ast.FunctionDef,
ast.ClassDef,
ast.AsyncFunctionDef,
ast.ExceptHandler,
),
)
}
def collect_names(code):
for instruction in dis.get_instructions(code):
if instruction.opname in (
"STORE_NAME",
"LOAD_NAME",
"LOAD_GLOBAL",
"STORE_FAST",
"LOAD_FAST",
"LOAD_ATTR",
"STORE_ATTR",
):
# TODO: "IMPORT_FROM" gets also mangled but is
currently not handled by executing
#
# class Test:
# from __mangle11c.__suc11c import __submodule11c
as __subc11
# IMPORT_FROM(_Test__submodule11c)
# STORE_NAME(_Test__subc11)
name = instruction.argval
if name in ("__module__", "__qualname__",
"__name__","__static_attributes__","__firstlineno__"):
continue
yield name
for const in code.co_consts:
if isinstance(const, type(code)):
for name in collect_names(const):
yield name
code_names = set(collect_names(compile(tree, "<code>", "exec")))
assert code_names == tree_names
return tree_names
code = "from __mangle11c.__suc11c import __submodule11c as __subc11"
assert result(code) == {"__subc11"}
assert result("class Test:", code) == {"Test", "_Test__subc11"}
> assert result("class Test:", "def func():", code) == {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"Test",
"func",
"_Test__subc11",
}
tests/test_pytest.py:245:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
code_levels = ('class Test:', 'def func():', 'from __mangle11c.__suc11c import
__submodule11c as __subc11')
code = 'class Test:\n def func():\n from __mangle11c.__suc11c import
__submodule11c as __subc11\n'
i = 2, level = 'from __mangle11c.__suc11c import __submodule11c as __subc11'
def result(*code_levels):
code = ""
for i, level in enumerate(code_levels):
code += indent(level, " " * i) + "\n"
tree = ast.parse(code)
for parent in ast.walk(tree):
for child in ast.iter_child_nodes(parent):
child.parent = parent
tree_names = {
mangled_name(n)
for n in ast.walk(tree)
if isinstance(
n,
(
ast.Name,
ast.Attribute,
ast.alias,
ast.FunctionDef,
ast.ClassDef,
ast.AsyncFunctionDef,
ast.ExceptHandler,
),
)
}
def collect_names(code):
for instruction in dis.get_instructions(code):
if instruction.opname in (
"STORE_NAME",
"LOAD_NAME",
"LOAD_GLOBAL",
"STORE_FAST",
"LOAD_FAST",
"LOAD_ATTR",
"STORE_ATTR",
):
# TODO: "IMPORT_FROM" gets also mangled but is currently
not handled by executing
#
# class Test:
# from __mangle11c.__suc11c import __submodule11c as
__subc11
# IMPORT_FROM(_Test__submodule11c)
# STORE_NAME(_Test__subc11)
name = instruction.argval
if name in ("__module__", "__qualname__",
"__name__","__static_attributes__","__firstlineno__"):
continue
yield name
for const in code.co_consts:
if isinstance(const, type(code)):
for name in collect_names(const):
yield name
code_names = set(collect_names(compile(tree, "<code>", "exec")))
> assert code_names == tree_names
E AssertionError: assert {'Test', '_Te...ll__', 'func'} == {'Test',
'_Te...bc11', 'func'}
E
E Extra items in the left set:
E '__classdictcell__'
E Use -v to get more diff
tests/test_pytest.py:235: AssertionError
=========================== short test summary info ============================
FAILED tests/test_main.py::test_global_tester_calls - KeyError: '[]'
FAILED tests/test_pytest.py::test_mangled_name - AssertionError: assert {'Tes...
=========== 2 failed, 13 passed, 15 skipped, 179 deselected in 0.88s ===========
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.14/build; python3.14 -m pytest "-k not
TestStuff and not test_small_samples "
I: pybuild base:317: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build;
python3.13 -m pytest "-k not TestStuff and not test_small_samples "
============================= test session starts ==============================
platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build
configfile: pyproject.toml
plugins: typeguard-4.4.4
collected 209 items / 179 deselected / 30 selected
tests/test_ipython.py .. [ 6%]
tests/test_main.py sssssssssssssss. [ 60%]
tests/test_pytest.py ............ [100%]
================ 15 passed, 15 skipped, 179 deselected in 0.80s ================
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.14
3.13" returned exit code 13
make: *** [debian/rules:15: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
--- End Message ---