Bug 2279990 - python-pure-eval fails to build with Python 3.13: test_sys_modules: AssertionError
Summary: python-pure-eval fails to build with Python 3.13: test_sys_modules: Assertion...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pure-eval
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lumír Balhar
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2024-05-10 12:08 UTC by Karolina Surma
Modified: 2024-05-15 08:49 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-05-15 08:49:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github alexmojaki pure_eval issues 16 0 None open Test failure with Python 3.13.0b1 2024-05-13 11:35:05 UTC

Description Karolina Surma 2024-05-10 12:08:24 UTC
python-pure-eval fails to build with Python 3.13.0b1.


=================================== 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 0x7f87699d70d0>

    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=...e__'))]))])])"
E         Skipping 4274 identical leading characters in diff, use -v to show
E         - alue=List()), Assign(targets=[Attribute(value=Name(id='self'), attr='_iterating')], value=Call(func=Name(id='set'))), Assign(targets=[Attribute(value=Name(id='self'), attr='data')], value=Dict())]), FunctionDef(name='_commit_removals', args=arguments(args=[arg(arg='self')]), body=[Assign(targets=[Name(id='pop')], value=Attribute(value=Attribute(value=Name(id='self'), attr='_pending_removals'), attr='pop')), Assign(targets=[Name(id='d')], value=Attribute(value=Name(id='self'), attr='data')), While(test=C...
E         
E         ...Full output truncated (4 lines hidden), use '-vv' to show

tests/test_utils.py:65: AssertionError
FAILED tests/test_utils.py::test_sys_modules - assert "Module(body=...e__'))]...

https://docs.python.org/3.13/whatsnew/3.13.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/07434127-python-pure-eval/

For all our attempts to build python-pure-eval with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-pure-eval/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.13:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Lumír Balhar 2024-05-13 11:35:05 UTC
Reported upstream: https://github.com/alexmojaki/pure_eval/issues/16

Comment 2 Lumír Balhar 2024-05-15 08:49:31 UTC
Fixed in https://github.com/cloudpipe/cloudpickle/pull/534


Note You need to log in before you can comment on or make changes to this bug.