Bug 2165876

Summary: python-typing-extensions fails to build with Python 3.12: AssertionError: 'frozen_default': False missing in dictionary
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-typing-extensionsAssignee: Jonny Heggheim <hegjon>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 38CC: code, epel-packagers-sig, hegjon, mail, mhroncok, michel, thrnciar
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: 2023-02-15 13:20:21 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: 2169898    
Bug Blocks: 2135404    

Description Tomáš Hrnčiar 2023-01-31 10:45:12 UTC
python-typing-extensions fails to build with Python 3.12.0a4.

======================================================================
FAIL: test_base_class (test_typing_extensions.DataclassTransformTests.test_base_class)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/typing_extensions-4.4.0/src/test_typing_extensions.py", line 2994, in test_base_class
    self.assertEqual(
AssertionError: {'eq_[62 chars]e, 'frozen_default': False, 'field_specifiers'[45 chars]rue}} != {'eq_[62 chars]e, 'field_specifiers': (), 'kwargs': {'make_ev[20 chars]rue}}
  {'eq_default': True,
   'field_specifiers': (),
-  'frozen_default': False,
   'kw_only_default': False,
   'kwargs': {'make_everything_awesome': True},
   'order_default': True}

======================================================================
FAIL: test_decorator (test_typing_extensions.DataclassTransformTests.test_decorator)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/typing_extensions-4.4.0/src/test_typing_extensions.py", line 2964, in test_decorator
    self.assertEqual(
AssertionError: {'eq_[62 chars]e, 'frozen_default': False, 'field_specifiers'[14 chars]: {}} != {'eq_[62 chars]e, 'field_specifiers': (), 'kwargs': {}}
  {'eq_default': True,
   'field_specifiers': (),
-  'frozen_default': False,
   'kw_only_default': True,
   'kwargs': {},
   'order_default': False}

======================================================================
FAIL: test_metaclass (test_typing_extensions.DataclassTransformTests.test_metaclass)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/typing_extensions-4.4.0/src/test_typing_extensions.py", line 3025, in test_metaclass
    self.assertEqual(
AssertionError: {'eq_[62 chars]e, 'frozen_default': False, 'field_specifiers'[101 chars]: {}} != {'eq_[62 chars]e, 'field_specifiers': (<class 'test_typing_ex[76 chars]: {}}
  {'eq_default': True,
   'field_specifiers': (<class 'test_typing_extensions.DataclassTransformTests.test_metaclass.<locals>.Field'>,),
-  'frozen_default': False,
   'kw_only_default': False,
   'kwargs': {},
   'order_default': True}

----------------------------------------------------------------------
Ran 261 tests in 0.052s

FAILED (failures=3, skipped=20)

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.12/fedora-rawhide-x86_64/05364992-python-typing-extensions/

For all our attempts to build python-typing-extensions with Python 3.12, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/package/python-typing-extensions/

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

Let us know here if you have any questions.

Python 3.12 is planned to be included in Fedora 39. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.12.
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 2 Jonny Heggheim 2023-01-31 16:59:22 UTC
I have asked upstream if they can make a new release https://github.com/python/typing_extensions/issues/111

Comment 3 Ben Cotton 2023-02-07 15:07:39 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.

Comment 4 Jonny Heggheim 2023-02-15 10:41:25 UTC
python-typing-extensions-4.5.0 have been pushed and built on rawhide and f38. Can you verify that this fixes the issue?

Comment 5 Ben Beasley 2023-02-15 13:10:17 UTC
(In reply to Jonny Heggheim from comment #4)
> python-typing-extensions-4.5.0 have been pushed and built on rawhide and
> f38. Can you verify that this fixes the issue?

The updated package built successfully in the Python 3.12 COPR:

https://copr.fedorainfracloud.org/coprs/g/python/python3.12/package/python-typing-extensions/