-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Overhaul some of the stubs for requests/urllib3 #2612
Comments
The I haven't looked into the more specific issue you mentioned with |
Looking at the git history, it appears that One of the problems with the current stubs are that the As for
I think that's a very valid question -- And why I hope that people really adopt PEP-561. Then it's the library's problem rather than typeshed's ... Time will tell. Is |
Yes, Protocols are fine to use in typeshed. |
Moreover, you can just write |
Can this be closed since urllib3/urllib3#1897 is seeing more action than is seen here? |
If our requests stubs just |
Hey folks, I'm going around in circles in issues, this one is still open though 🤣 I'm getting |
This depends on #5952. Then we can update the requests stubs to depend on urllib3 and remove the vendored urllib3 stubs. |
@srittau so something is in the works but not ready to go? |
In the works as in "I need to find the time to implement it". |
More than fair enough 😄 Just wanted to make sure I wasn't missing one ready to go! |
I believe this means that most of the problems discussed in this issue are now solved.
I'm not sure if this is still a problem four years on. If it is, please feel free to open a new issue and/or PR :) |
Specifically, it looks like the stubs for
requests
date back to a time whenurllib3
was vendored with requests. These days, it looks like requests doesn't vendor it anymore and instead usesurllib3
from pypi.I think that
urllib3
should become it's own top-level stubs (not part ofrequests
) and some of the requests stubs should probably be revisited. In order to limit scope, the particular stubs that I've been fighting with inrequests.adapters
--BaseAdaptor.send
doesn't acceptproxies
(even though it should),HTTPAdaptor.send
has virtually no type annotations whenBaseAdaptor.send
does -- I think they should be basically the same...What do you think?
The text was updated successfully, but these errors were encountered: