8000 requests: allow str and bytes for fileobj in files parameter by milanboers · Pull Request #7728 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

requests: allow str and bytes for fileobj in files parameter #7728

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

Merged
merged 2 commits into from
Apr 28, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
requests: allow str and bytes for fileobj in files parameter
  • Loading branch information
milanboers committed Apr 27, 2022
commit b9dcd5e16bb2e94371f0c014a7fb20c35ee682eb
8 changes: 4 additions & 4 deletions stubs/requests/requests/sessions.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ _Data: TypeAlias = str | bytes | Mapping[str, Any] | Iterable[tuple[str, str | N
_Auth: TypeAlias = Union[tuple[str, str], _auth.AuthBase, Callable[[PreparedRequest], PreparedRequest]]
_Cert: TypeAlias = Union[str, tuple[str, str]]
_Files: TypeAlias = (
MutableMapping[str, IO[Any]]
| MutableMapping[str, tuple[str | None, IO[Any]]]
| MutableMapping[str, tuple[str | None, IO[Any], str]]
| MutableMapping[str, tuple[str | None, IO[Any], str, _TextMapping]]
MutableMapping[str, IO[Any] | str | bytes]
| MutableMapping[str, tuple[str | None, IO[Any] | str | bytes]]
| MutableMapping[str, tuple[str | None, IO[Any] | str | bytes, str]]
| MutableMapping[str, tuple[str | None, IO[Any] | str | bytes, str, _TextMapping]]
)
_Hook: TypeAlias = Callable[[Response], Any]
_Hooks: TypeAlias = MutableMapping[str, _Hook | list[_Hook]]
Expand Down
0