Bug 2279988

Summary: python-gast fails to build with Python 3.13: AssertionError: "Expr[59 chars]ram())]), body=Name(id='x', ctx=Load())))" != "Expr[59 chars]ram(), annotation=None, type_comment=None)], p[148 chars]e)))"
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-gastAssignee: Miro Hrončok <mhroncok>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: fti-bugs, ksurma, mhroncok, python-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-gast-0.5.4^20240601.bf62db90-1.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-06-15 20:13:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2260875, 2260877, 2244836, 2280964, 2291911, 2291991    

Description Karolina Surma 2024-05-10 12:06:22 UTC
python-gast fails to build with Python 3.13.0b1.

30 tests fail with similar issues:

____________________________ APITestCase.test_dump _____________________________

self = <tests.test_api.APITestCase testMethod=test_dump>

    def test_dump(self):
        code = 'lambda x: x'
        tree = gast.parse(code, mode='eval')
        dump = gast.dump(tree)
        norm = ("Expression(body=Lambda(args=arguments(args=[Name("
                "id='x', ctx=Param(), "
                "annotation=None, type_comment=None)], posonlyargs=[], "
                "vararg=None, kwonlyargs=[], kw_defaults=[], kwarg=None, "
                "defaults=[]), body=Name(id='x', ctx=Load(), "
                "annotation=None, type_comment=None)"
                "))")
>       self.assertEqual(dump, norm)
E       AssertionError: "Expr[59 chars]ram())]), body=Name(id='x', ctx=Load())))" != "Expr[59 chars]ram(), annotation=None, type_comment=None)], p[148 chars]e)))"
E       - Expression(body=Lambda(args=arguments(args=[Name(id='x', ctx=Param())]), body=Name(id='x', ctx=Load())))
E       + Expression(body=Lambda(args=arguments(args=[Name(id='x', ctx=Param(), annotation=None, type_comment=None)], posonlyargs=[], vararg=None, kwonlyargs=[], kw_defaults=[], kwarg=None, defaults=[]), body=Name(id='x', ctx=Load(), annotation=None, type_comment=None)))

tests/test_api.py:44: AssertionError

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/07434069-python-gast/

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

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 Karolina Surma 2024-06-12 15:01:54 UTC
*** Bug 2291711 has been marked as a duplicate of this bug. ***