Source: python-pure-eval
Version: 0.2.2-2
Tags: fixed-upstream
User: debian-pyt...@lists.debian.org
Usertags: python3.13
Forwarded: 
https://github.com/alexmojaki/pure_eval/commit/89645cfd19d1480d586af50842f0ac264a036fa8

This package failed build from source when test-built against a version of
python3-defaults that includes 3.13 as a supported version.

To reproduce this issue, build against python3-defaults (python3-all-dev etc.)
from Debian experimental.

What's new in Python 3.13:
https://docs.python.org/3.13/whatsnew/3.13.html

Log snippet:

   dh_auto_test -O--buildsystem=pybuild
        pybuild --test --test-pytest -i python{version} -p "3.13 3.12"
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build; 
python3.13 -m pytest tests
============================= test session starts ==============================
platform linux -- Python 3.13.0rc2, pytest-8.3.3, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build
configfile: pyproject.toml
plugins: typeguard-4.3.0
collected 47 items

tests/test_core.py .................                                     [ 36%]
tests/test_getattr_static.py .......................                     [ 85%]
tests/test_utils.py F......                                              [100%]

=================================== FAILURES ===================================
_______________________________ test_sys_modules _______________________________

    def test_sys_modules():
        modules = sys_modules_sources()
        if not os.environ.get('PURE_EVAL_SLOW_TESTS'):
            modules = islice(modules, 0, 3)
    
        for filename, source, tree in modules:
            print(filename)
            if not filename.endswith("ast.py"):
>               check_copy_ast_without_context(tree)

tests/test_utils.py:53: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tree = <ast.Module object at 0xffffabf3b3d0>

    def check_copy_ast_without_context(tree):
        tree2 = copy_ast_without_context(tree)
        dump1 = ast.dump(tree)
        dump2 = ast.dump(tree2)
        normalised_dump1 = re.sub(
            r", ctx=(Load|Store|Del)\(\)",
            "",
            dump1
        )
>       assert normalised_dump1 == dump2
E       assert "Module(body=...e__'))]))])])" == 'Module(body=...oad())]))])])'
E         
E         Skipping 511 identical leading characters in diff, use -v to show
E         - e(id='obj', ctx=Load()), attr='__qualname__', ctx=Load()))], 
handlers=[ExceptHandler(type=Name(id='AttributeError', ctx=Load()), 
body=[Return(value=Attribute(value=Call(func=Name(id='type', ctx=Load()), 
args=[Name(id='obj', ctx=Load())]), attr='__qualname__', ctx=Load()))])])]), 
Assign(targets=[Name(id='_thread', ctx=Load())], value=Constant(value=None)), 
Assign(targets=[Name(id='_warnings', ctx=Load())], value=Constant(value=None)), 
Assign(targets=[Name(id='_weakref', ctx=Load())], value=Constant(value=...
E         
E         ...Full output truncated (2 lines hidden), use '-vv' to show

tests/test_utils.py:65: AssertionError
----------------------------- Captured stdout call -----------------------------
/usr/lib/python3.13/importlib/_bootstrap.py
=============================== warnings summary ===============================
tests/test_core.py::test_cannot_subscript[[1][:,:]]
  <string>:1: SyntaxWarning: list indices must be integers or slices, not 
tuple; perhaps you missed a comma?

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_utils.py::test_sys_modules - assert "Module(body=...e__'))]...
=================== 1 failed, 46 passed, 1 warning in 5.98s ====================
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build; python3.13 -m pytest tests
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build; 
python3.12 -m pytest tests
============================= test session starts ==============================
platform linux -- Python 3.12.6, pytest-8.3.3, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build
configfile: pyproject.toml
plugins: typeguard-4.3.0
collected 47 items

tests/test_core.py .................                                     [ 36%]
tests/test_getattr_static.py .......................                     [ 85%]
tests/test_utils.py .......                                              [100%]

=============================== warnings summary ===============================
tests/test_core.py::test_cannot_subscript[[1][:,:]]
  <string>:1: SyntaxWarning: list indices must be integers or slices, not 
tuple; perhaps you missed a comma?

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 47 passed, 1 warning in 2.27s =========================
        rm -fr -- /tmp/dh-xdg-rundir-yZdBpavO
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.13 
3.12" returned exit code 13
make: *** [debian/rules:6: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2024-09-19T06:12:12Z


If required, the full build log is available here (for the next 30 days):
https://debusine.debian.net/artifact/787570/

This bug has been filed at "normal" severity, as we haven't started the
transition to add 3.13 as a supported version, yet. This will be raised to RC
as soon as that happens, hopefully well before trixie.

Thanks,

Stefano

Reply via email to