-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
stubs/requests: expand types for files #7999
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
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
Thanks! I dug around in the source code and tried out your repro, all looks good. Just one comment about how we can simplify the code a little, and also make the stub a little more permissive.
This comment has been minimized.
This comment has been minimized.
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.
LGTM, but given the number of issues we've had with requests
stubs recently, I'd like a second opinion before merging :)
This comment has been minimized.
This comment has been minimized.
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.
I'm mostly concerned about using _TextMapping
. The rest are small nits.
This comment has been minimized.
This comment has been minimized.
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
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.
Thanks!
Which version will reflect these changes? |
@isFakeAccount I can confirm these changes were released as of at least pip install types-requests==2.27.30 -U |
Thanks for the quick response @tommilligan |
Relates to #7724
Closes #7998
This PR allows passing a sequence of tuple for the
files
argument, where applicable in therequests
library.Existing types have been aliased for readability, and to document that all type of file specification are supported in either the
Mapping
orSequence[tuple]
form.