Bug 2279984

Summary: python-astunparse fails to build with Python 3.13: AssertionError: "Modu[72 chars]ad()), args=[], keywords=[]))], body=[Expr(val[50 chars]=[])" != "Modu[72 chars]ad())))], body=[Expr(value=Name(id='suite1', ctx=Load()))])])"
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-astunparseAssignee: Orphan Owner <extras-orphan>
Status: CLOSED WONTFIX 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: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-08-03 14:57:02 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: 2244836, 2260875, 2260877    

Description Karolina Surma 2024-05-10 11:49:32 UTC
python-astunparse fails to build with Python 3.13.0b1.

42 tests fail with different values of the asserted objects. For example:

======================================================================
FAIL: test_with_simple (tests.test_dump.DumpTestCase.test_with_simple)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/astunparse-1.6.3/tests/common.py", line 403, in test_with_simple
    self.check_roundtrip(with_simple)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/builddir/build/BUILD/astunparse-1.6.3/tests/test_dump.py", line 24, in check_roundtrip
    self.assertASTEqual(dump1, dump2)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/astunparse-1.6.3/tests/test_dump.py", line 18, in assertASTEqual
    self.assertEqual(dump1, dump2)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
AssertionError: "Modu[72 chars]ad()), args=[], keywords=[]))], body=[Expr(val[50 chars]=[])" != "Modu[72 chars]ad())))], body=[Expr(value=Name(id='suite1', ctx=Load()))])])"
- Module(body=[With(items=[withitem(context_expr=Call(func=Name(id='f', ctx=Load()), args=[], keywords=[]))], body=[Expr(value=Name(id='suite1', ctx=Load()))])], type_ignores=[])
?                                                                                  ----------------------                                                       -----------------
+ Module(body=[With(items=[withitem(context_expr=Call(func=Name(id='f', ctx=Load())))], body=[Expr(value=Name(id='suite1', ctx=Load()))])])


======================================================================
FAIL: test_with_two_items (tests.test_dump.DumpTestCase.test_with_two_items)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/astunparse-1.6.3/tests/common.py", line 410, in test_with_two_items
    self.check_roundtrip(with_two_items)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/astunparse-1.6.3/tests/test_dump.py", line 24, in check_roundtrip
    self.assertASTEqual(dump1, dump2)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/astunparse-1.6.3/tests/test_dump.py", line 18, in assertASTEqual
    self.assertEqual(dump1, dump2)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
AssertionError: "Modu[72 chars]ad()), args=[], keywords=[]), optional_vars=Na[214 chars]=[])" != "Modu[72 chars]ad())), optional_vars=Name(id='x', ctx=Store()[153 chars]])])"
- Module(body=[With(items=[withitem(context_expr=Call(func=Name(id='f', ctx=Load()), args=[], keywords=[]), optional_vars=Name(id='x', ctx=Store())), withitem(context_expr=Call(func=Name(id='g', ctx=Load()), args=[], keywords=[]), optional_vars=Name(id='y', ctx=Store()))], body=[Expr(value=Name(id='suite1', ctx=Load()))])], type_ignores=[])
+ Module(body=[With(items=[withitem(context_expr=Call(func=Name(id='f', ctx=Load())), optional_vars=Name(id='x', ctx=Store())), withitem(context_expr=Call(func=Name(id='g', ctx=Load())), optional_vars=Name(id='y', ctx=Store()))], body=[Expr(value=Name(id='suite1', ctx=Load()))])])


----------------------------------------------------------------------
Ran 94 tests in 0.057s

FAILED (failures=42, skipped=8)

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/07433964-python-astunparse/

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

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 14:58:40 UTC
*** Bug 2291624 has been marked as a duplicate of this bug. ***

Comment 2 Miro HronĨok 2024-06-17 14:01:32 UTC
I've orphaned the package.

Comment 3 Fedora Fails To Install 2024-06-17 18:11:06 UTC
This package has been orphaned.

You can pick it up at https://src.fedoraproject.org/rpms/python-astunparse by clicking button "Take". If nobody picks it up, it will be retired and removed from a distribution.

Comment 4 Maxwell G 2024-08-03 14:57:02 UTC
Automation has figured out the package is retired in Fedora Rawhide.

If you like it to be unretired, please open a ticket at
https://pagure.io/releng/new_issue?template=package_unretirement