Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.14 removed the URLopener and FancyURLopener classes from urllib.request #388

Merged
merged 1 commit into from
Dec 1, 2024

Conversation

hroncok
Copy link
Contributor

@hroncok hroncok commented Nov 22, 2024

python/cpython#84850

Remove URLopener and FancyURLopener classes from urllib.request.
They had previously raised DeprecationWarning since Python 3.3.

The test failures were:

__________________ 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:170: 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:170: AttributeError

…lib.request

python/cpython#84850

> Remove URLopener and FancyURLopener classes from urllib.request.
> They had previously raised DeprecationWarning since Python 3.3.

The test failures were:

    __________________ 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:170: 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:170: AttributeError
@benjaminp benjaminp merged commit 9a05aab into benjaminp:master Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants