-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
GH-84850: Remove urllib.request.URLopener
and FancyURLopener
#125739
base: main
Are you sure you want to change the base?
Conversation
These classes have been deprecated since Python 3.3.
A code search on PyPI top 8,000 projects (at 2024-10-16) on
I didn't check the code to see if imports are conditionals on Python <= 3.3 or not. I ignored
cc @hugovk |
Thanks Victor. From that list, I think about 6 packages are using |
I believe only four packages would break for users if we removed these classes:
I'll work on PRs if the package authors seem interested. |
I've submitted PRs against the three projects, one of which has been accepted already. They're all simple changes - in Python 2 terms, we're upgrading from Given that 3.14 is still around a year away, and only 3 projects in 8,000 are affected and possible to remedy at this stage, I submit that we don't need to wait for the other two PRs. Thoughts? |
Agreed, this is definitely on the low side. |
finally: | ||
self.unfakeftp() | ||
|
||
def test_userpass_inurl(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test and the one below are removed due to GH-78809
These classes have been deprecated since Python 3.3. They originate in Python 2's
urllib
, whereas most of the rest of this module comes fromurllib2
.📚 Documentation preview 📚: https://cpython-previews--125739.org.readthedocs.build/