8000 Beta: async streaming by richardm-stripe · Pull Request #1233 · stripe/stripe-python · GitHub
[go: up one dir, main page]

Skip to content
8000

Beta: async streaming #1233

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 9 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
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
Prev Previous commit
Revert unnecessary underscore
  • Loading branch information
richardm-stripe committed Feb 14, 2024
commit f02f30fe6f2fd70a593e1369a201e34b451e431c
2 changes: 1 addition & 1 deletion stripe/_api_requestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def request_stream(
)
return resp

async def _request_stream_async( 8000
async def request_stream_async(
self,
method: str,
url: str,
Expand Down
2 changes: 1 addition & 1 deletion stripe/_api_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ async def _static_request_stream_async(
api_mode: ApiMode = "V1",
):
request_options, request_params = extract_options_from_dict(params)
return await _APIRequestor._global_instance()._request_stream_async(
return await _APIRequestor._global_instance().request_stream_async(
method,
url,
params=request_params,
Expand Down
2 changes: 1 addition & 1 deletion stripe/_stripe_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ async def _request_stream_async(
params = self._retrieve_params

request_options, request_params = extract_options_from_dict(params)
return await self._requestor._request_stream_async( # pyright: ignore[reportPrivateUsage]
return await self._requestor.request_stream_async(
method,
url,
params=request_params,
Expand Down
2 changes: 1 addition & 1 deletion stripe/_stripe_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ async def _request_stream_async(
base_address: BaseAddress,
api_mode: ApiMode,
) -> StripeStreamResponseAsync:
return await self._requestor._request_stream_async(
return await self._requestor.request_stream_async(
method,
url,
params,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_api_requestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ async def async_iter():
rcode=200,
)

resp = await requestor_streaming._request_stream_async(
resp = await requestor_streaming.request_stream_async(
meth,
self.valid_path,
{},
Expand Down
0