Bug 2080868 - python-typing-extensions fails to build with Python 3.11: AttributeError: <module 'typing' from '/usr/lib64/python3.11/typing.py'> does not have the attribute '_overload_registry'
Summary: python-typing-extensions fails to build with Python 3.11: AttributeError: <mo...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: python-typing-extensions
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jonny Heggheim
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2022-05-02 08:15 UTC by Tomáš Hrnčiar
Modified: 2022-06-13 09:11 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-13 09:11:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github python typing issues 1173 0 None open typing-extensions 4.2.0 test fails on Python 3.11.0a7 2022-05-02 10:20:55 UTC

Description Tomáš Hrnčiar 2022-05-02 08:15:01 UTC
python-typing-extensions fails to build with Python 3.11.0a7.

=================================== FAILURES ===================================
_____________________ OverloadTests.test_overload_registry _____________________
/usr/lib64/python3.11/unittest/mock.py:1356: in patched
    with self.decoration_helper(patched,
/usr/lib64/python3.11/contextlib.py:137: in __enter__
    return next(self.gen)
/usr/lib64/python3.11/unittest/mock.py:1338: in decoration_helper
    arg = exit_stack.enter_context(patching)
/usr/lib64/python3.11/contextlib.py:499: in enter_context
    result = _enter(cm)
/usr/lib64/python3.11/unittest/mock.py:1427: in __enter__
    original, local = self.get_original()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <unittest.mock._patch object at 0x7fb2d2b3a490>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.__dict__[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'typing' from '/usr/lib64/python3.11/typing.py'> does not have the attribute '_overload_registry'

/usr/lib64/python3.11/unittest/mock.py:1400: AttributeError
=========================== short test summary info ============================
FAILED src/test_typing_extensions.py::OverloadTests::test_overload_registry
=================== 1 failed, 224 passed, 1 skipped in 0.44s ===================

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/04351158-python-typing-extensions/

For all our attempts to build python-typing-extensions with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/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.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 Jonny Heggheim 2022-05-02 10:20:56 UTC
Reported upstream https://github.com/python/typing/issues/1173

Comment 2 Jonny Heggheim 2022-05-02 13:40:12 UTC
From upstream: It should work with beta 1, which is scheduled for Friday.


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