Bug 2084447 - python-serpent fails to build with Python 3.11: KeyError: '__class__'
Summary: python-serpent fails to build with Python 3.11: KeyError: '__class__'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-serpent
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fabian Affolter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2099105 (view as bug list)
Depends On:
Blocks: PYTHON3.11 F37FTBFS F37FailsToInstall 2098985 2099078
TreeView+ depends on / blocked
 
Reported: 2022-05-12 07:36 UTC by Tomáš Hrnčiar
Modified: 2022-06-23 23:56 UTC (History)
3 users (show)

Fixed In Version: python-serpent-1.40-1.fc37
Clone Of:
Environment:
Last Closed: 2022-06-23 23:56:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github irmen Serpent issues 40 0 None open Python 3.11 test failures 2022-06-22 07:41:14 UTC

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.


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