Bug 2084447

Summary: python-serpent fails to build with Python 3.11: KeyError: '__class__'
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-serpentAssignee: Fabian Affolter <mail>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mail, mhroncok, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-serpent-1.40-1.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-23 23:56:03 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: 2016048, 2045102, 2045109, 2098985, 2099078    

Description Tomáš Hrnčiar 2022-05-12 07:36:25 UTC
python-serpent fails to build with Python 3.11.0b1.

======================================================================
ERROR: test_class2 (test_serpent.TestBasics.test_class2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/serpent-1.30.2/tests/test_serpent.py", line 516, in test_class2
    self.assertEqual('pprint.PrettyPrinter', data["__class__"])
                                             ~~~~^^^^^^^^^^^^^
KeyError: '__class__'

======================================================================
ERROR: testRegular (test_serpent.TestInterceptClass.testRegular)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/serpent-1.30.2/tests/test_serpent.py", line 810, in testRegular
    self.assertEqual("PrettyPrinter", data["__class__"])
                                      ~~~~^^^^^^^^^^^^^
KeyError: '__class__'

======================================================================
FAIL: testAttr (test_serpent.DataclassesTests.testAttr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/serpent-1.30.2/tests/test_serpent.py", line 1138, in testAttr
    self.assertDictEqual({"__class__": "InventoryItem", "name": "television", "quantity_on_hand": 5,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: {'__class__': 'InventoryItem', 'name': 'tel[72 chars]ped'} != {'name': 'television', 'unit_price': 1899.9[42 chars]ped'}
- {'__class__': 'InventoryItem',
-  'name': 'television',
? ^

+ {'name': 'television',
? ^

   'quantity_on_hand': 5,
   'unit_price': 1899.95,
   'untyped': 'untyped'}

======================================================================
FAIL: test_class (test_serpent.TestBasics.test_class)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/serpent-1.30.2/tests/test_serpent.py", line 495, in test_class
    self.assertEqual({'__class__': 'Class1', 'attr': 1}, data)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: {'__class__': 'Class1', 'attr': 1} != {'attr': 1}
- {'__class__': 'Class1', 'attr': 1}
+ {'attr': 1}

======================================================================
FAIL: testChainMap (test_serpent.TestCollections.testChainMap)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/serpent-1.30.2/tests/test_serpent.py", line 1081, in testChainMap
    self.assertEqual({'__class__': 'ChainMap', 'maps': [{'a': 1}, {'b': 2}, {'c': 3}]}, c2)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: {'__class__': 'ChainMap', 'maps': [{'a': 1}, {'b': 2}, {'c': 3}]} != {'maps': [{'a': 1}, {'b': 2}, {'c': 3}]}
- {'__class__': 'ChainMap', 'maps': [{'a': 1}, {'b': 2}, {'c': 3}]}
?  -------------------------

+ {'maps': [{'a': 1}, {'b': 2}, {'c': 3}]}

----------------------------------------------------------------------
Ran 76 tests in 0.061s

FAILED (failures=3, errors=2, skipped=2)

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/04392660-python-serpent/

For all our attempts to build python-serpent with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-serpent/

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.11:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/

Let us know here if you have any questions.

Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
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 Miro Hrončok 2022-06-20 10:20:01 UTC
*** Bug 2099105 has been marked as a duplicate of this bug. ***

Comment 2 Fedora Update System 2022-06-23 23:55:54 UTC
FEDORA-2022-8a8eb53a85 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-8a8eb53a85

Comment 3 Fedora Update System 2022-06-23 23:56:03 UTC
FEDORA-2022-8a8eb53a85 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.