Deprecate urllib3.request module
See original GitHub issueContext
After adding the top-level request()
method, We have a function named request
in urllib3.__init__.py
and a module named request
(urllib3.request.py
). It changes the from request import request
behavior.
- Old behavior: importing
request
module. - New behavior: importing
request
function.
Possible Solution
- We could rename the
request
module tourllib3.request_methods
and add a deprecated moduleurllib3.request
. - We have to raise an
AttributeError
when accessingrequest.RequestMethods
Contribution
Would you be willing to submit a PR? (Help can be provided if you need assistance submitting a PR)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
[Python-Dev] It's now time to deprecate the stdlib urllib module
I propose to deprecate the urllib module in Python 3.11. It would emit ... In 2011, the "requests" module based on urllib3 was...
Read more >Utilities - urllib3 1.26.13 documentation
A retry is initiated if the request method is in allowed_methods and the response status code is in status_forcelist . By default, this...
Read more >urllib.request — Extensible library for opening URLs — Python ...
The urllib.request module defines functions and classes which help in opening URLs (mostly HTTP) in a complex world — basic and digest authentication, ......
Read more >Victor Stinner on Twitter: ""It's now time to deprecate the stdlib ...
I propose to deprecate the urllib module in Python 3.11. There are better alternatives which ... IMO it's ok to require pulling your...
Read more >How do I disable log messages from the Requests library?
You only need to ask the urllib3 library to not propagate: logging.getLogger("urllib3").propagate = False , or increase the logging level if you still...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Probably it’s the same issue but following the instructions from the website:
Not a good first-user experience. At least update the documentation.
This is all very true, unfortunately urllib3 painted itself into a corner by documenting its internals as public APIs.