GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — remove deprecated urllib.request.URLopener/FancyURLopener · Issue #84850 · python/cpython

remove deprecated urllib.request.URLopener/FancyURLopener #84850

New issue
Copy link
New issue
Copy link
Closed
Closed
remove deprecated urllib.request.URLopener/FancyURLopener#84850
Copy link
Labels
3.11only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

Description

PetterS
mannequin
opened on May 18, 2020
Issue body actions
BPO 40673
Nosy @vstinner, @PetterS, @remilapeyre, @idomic

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2020-05-18.21:30:13.142>
labels = ['type-feature', 'library', '3.11']
title = 'remove deprecated urllib.request.URLopener/FancyURLopener'
updated_at = <Date 2021-11-23.13:31:04.736>
user = 'https://github.com/PetterS'

bugs.python.org fields:

activity = <Date 2021-11-23.13:31:04.736>
actor = 'vstinner'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2020-05-18.21:30:13.142>
creator = 'Petter S'
dependencies = []
files = []
hgrepos = []
issue_num = 40673
keywords = []
message_count = 7.0
messages = ['369291', '369293', '369294', '369295', '369300', '369886', '406839']
nosy_count = 4.0
nosy_names = ['vstinner', 'Petter S', 'remi.lapeyre', 'Ido Michael']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue40673'
versions = ['Python 3.11']

Linked PRs

  • GH-84850: Remove urllib.request.URLopener and FancyURLopener #125739
  • GH-84850: Improve whatsnew entry for [Fancy]URLopener removal #127032

Activity

Next
  1. PetterS commented on May 18, 2020

    @PetterS
    PetterSmannequin
    on May 18, 2020
    MannequinAuthor
    More actions

    The following code crashes with TypeError:

    URLopener().open("unknown_proxy://test")

    the expected behavior is an OSError, which is normally raised for unknown protocols.

    This implementation of directly calling a method called "unknown_proxy" is fragile and was recently the subject of a security issue: https://bugs.python.org/issue35907 (CVE-2019-9948)

    Would be good to make this more robust.

  2. PetterS
    added
    3.7 (EOL)end of lifeend of life
    3.8 (EOL)end of lifeend of life
    3.9 (EOL)end of lifeend of life
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    type-featureA feature request or enhancementA feature request or enhancement
    on May 18, 2020
  3. PetterS
    changed the title [-]UrlOpener raises different exceptions based on implementation detail[/-] [+]urllib.request.URLopener raises different exceptions based on implementation detail[/+] on May 18, 2020
  4. PetterS
    changed the title [-]UrlOpener raises different exceptions based on implementation detail[/-] [+]urllib.request.URLopener raises different exceptions based on implementation detail[/+] on May 18, 2020
  5. PetterS commented on May 18, 2020

    @PetterS
    PetterSmannequin
    on May 18, 2020
    MannequinAuthor
    More actions

    I can fix this, but it does not have high priority.

  6. remilapeyre commented on May 18, 2020

    @remilapeyre
    remilapeyremannequin
    on May 18, 2020
    Mannequin
    More actions

    URLOpener has been deprecated since Python3.3 (https://github.com/python/cpython/blob/master/Lib/urllib/request.py#L1703-L1705) maybe it should just be removed from the codebase?

  7. 14 remaining items

  8. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  9. barneygale
    added a commit that references this issue on Oct 20, 2024

    pythonGH-84850: Remove `urllib.request.URLopener` and `FancyURLopener`

    2b3f775
  10. barneygale
    added a commit that references this issue on Oct 29, 2024

    Merge branch 'main' into pythongh-84850

    ea17ffc
  11. hugovk
    added a commit that references this issue on Nov 19, 2024

    GH-84850: Remove `urllib.request.URLopener` and `FancyURLopener` (#12…

    4d77197
  12. hugovk commented on Nov 19, 2024

    @hugovk
    hugovk
    on Nov 19, 2024
    Member
    More actions

    They've been removed in #125739.

    TODO:

    I think that we should provide some hints on how to replace code using removed APIs. Give some examples maybe?

    #125739 (comment)

  13. barneygale
    added a commit that references this issue on Nov 19, 2024

    pythonGH-84850: Improve whatsnew entry for `[Fancy]URLopener` depreca…

    cd4a191
  14. hugovk
    added a commit that references this issue on Nov 20, 2024

    GH-84850: Improve whatsnew entry for `[Fancy]URLopener` removal (#127032

    9d2a879
  15. barneygale commented on Nov 20, 2024

    @barneygale
    barneygale
    on Nov 20, 2024
    Contributor
    More actions

    urllib.request.URLopener and FancyURLopener are removed in Python 3.14. Thanks all.

    Reacted by Hugo van Kemenade
  16. barneygale
    closed this as completedon Nov 20, 2024
  17. hroncok
    added a commit that references this issue on Nov 22, 2024

    Python 3.14 removed the URLopener and FancyURLopener classes from url…

    1fbfc29
  18. benjaminp
    added a commit that references this issue on Dec 1, 2024

    Python 3.14 removed the URLopener and FancyURLopener classes from url…

    9a05aab
  19. ebonnal
    added 2 commits that reference this issue on Jan 12, 2025

    pythonGH-84850: Remove `urllib.request.URLopener` and `FancyURLopener` (

    21980f6

    pythonGH-84850: Improve whatsnew entry for `[Fancy]URLopener` removal (…

    0b32dc0
  20. jollaitbot
    added 2 commits that reference this issue on Sep 26, 2025

    fix(m2urllib): don't fail with missing urllib.request.URLopener

    27cf840

    fix(m2urllib): don't fail with missing urllib.request.URLopener

    378d2a2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.11only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.