Support fuller files kwarg for requests.post#743
Support fuller files kwarg for requests.post#743semperos wants to merge 2 commits intogetsentry:masterfrom
Conversation
The files keyword argument for the requests.post function has this type: files: _Files | None = ... This commit adds this type alias as found in requests version 2.32.2 and updates this library's multipart_matcher function's files keyword argument to be of type _Files.
|
should we just import it from |
👍 to importing the types if we can. |
|
I neglected to run |
|
I believe Python's Two paths forward that I see:
The original PR workflow run showed that the syntax I ported from requests of |
|
can you please send a permalink to the piece of code at |
|
Apologies for not double-checking the source of the types, I had jumped to them in my editor and didn't realize they weren't provided by the requests implementation itself. The types I included in my first commit were from typeshed. Here is the permalink to where Here is the permalink to the definition of |
|
so, if we add a dependency and import the type, will it work? |
Thanks for taking the time to review this! I ran into this type mismatch with some code that leverages the requests library and was hoping to update responses to match.
The
fileskeyword argument for therequests.postfunction has this type:This commit adds this type alias as found in requests version 2.32.2 and updates this library's
multipart_matcherfunction's files keyword argument to be of type_Files.