-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[rest] add response backcompat mixin #20827
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
Changes from 1 commit
9b207af
a948c25
b570b6f
4f2114b
d93d9ea
5a5225e
4ad5913
1b32e22
3b4be3a
d1e84d3
c593b0c
e26735c
609f297
4fe072f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,6 @@ | |
|
|
||
| if TYPE_CHECKING: | ||
| from typing import List | ||
| from ..pipeline._tools_async import HTTPResponseType | ||
| from ..pipeline.policies import SansIOHTTPPolicy | ||
|
|
||
| class _PartGenerator(AsyncIterator): | ||
|
|
@@ -21,7 +20,7 @@ class _PartGenerator(AsyncIterator): | |
| :param parts: An iterable of parts | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to update this?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do an async generator instead of having a class compatible with 3.5? I had the same thoughts, I can open an issue to do it in another PR if we think it's necessary |
||
| """ | ||
|
|
||
| def __init__(self, response: "HTTPResponseType", default_http_response_type: Any) -> None: | ||
| def __init__(self, response, default_http_response_type: Any) -> None: | ||
| self._response = response | ||
| self._parts = None | ||
| self._default_http_response_type = default_http_response_type | ||
|
|
||
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.
Have you tried it?
Does it give more information in intellisense (curious)?
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.
yeah, basically instead of having one typehint, we get two. (see the 1/2 / 2/2 in the lower left of the typehint)