Bug 2327971

Summary: python-six fails to build with Python 3.14: test_move_items_urllib_request: AttributeError: module 'six.moves.urllib.request' has no attribute 'URLopener' / 'FancyURLopener'
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-sixAssignee: Miro Hrončok <mhroncok>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: encukou, ksurma, mhroncok, python-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-six-1.17.0-1.fc42 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-12-02 18:15:40 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: 2322407    

Description Karolina Surma 2024-11-22 09:51:44 UTC
python-six fails to build with Python 3.14.0a2.

__________________ test_move_items_urllib_request[URLopener] ___________________

item_name = 'URLopener'

    @pytest.mark.parametrize("item_name",
                              [item.name for item in six._urllib_request_moved_attributes])
    def test_move_items_urllib_request(item_name):
        """Ensure that everything loads correctly."""
        assert item_name in dir(six.moves.urllib.request)
>       getattr(six.moves.urllib.request, item_name)
E       AttributeError: module 'six.moves.urllib.request' has no attribute 'URLopener'

test_six.py:159: AttributeError
________________ test_move_items_urllib_request[FancyURLopener] ________________

item_name = 'FancyURLopener'

    @pytest.mark.parametrize("item_name",
                              [item.name for item in six._urllib_request_moved_attributes])
    def test_move_items_urllib_request(item_name):
        """Ensure that everything loads correctly."""
        assert item_name in dir(six.moves.urllib.request)
>       getattr(six.moves.urllib.request, item_name)
E       AttributeError: module 'six.moves.urllib.request' has no attribute 'FancyURLopener'

test_six.py:159: AttributeError
=========================== short test summary info ============================
FAILED test_six.py::test_move_items_urllib_request[URLopener] - AttributeErro...
FAILED test_six.py::test_move_items_urllib_request[FancyURLopener] - Attribut...
============= 2 failed, 197 passed, 1 skipped, 2 warnings in 0.39s =============

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08293452-python-six/

For all our attempts to build python-six with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/python-six/

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

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
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 2024-11-22 11:02:18 UTC
https://github.com/python/cpython/issues/84850: Remove URLopener and FancyURLopener classes from urllib.request. They had previously raised DeprecationWarning since Python 3.3.

Comment 2 Miro Hrončok 2024-11-22 11:08:28 UTC
Upstream PR: https://github.com/benjaminp/six/pull/388

Comment 3 Miro Hrončok 2024-12-02 16:20:07 UTC
Downstream PR: https://src.fedoraproject.org/rpms/python-six/pull-request/22

Comment 4 Fedora Update System 2025-01-06 13:54:35 UTC
FEDORA-2025-44521bac73 (python-six-1.17.0-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-44521bac73

Comment 5 Fedora Update System 2025-01-06 16:28:55 UTC
FEDORA-2025-44521bac73 (python-six-1.17.0-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.