xtr-http-client-contracts 5.2.0__tar.gz → 5.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/PKG-INFO +1 -1
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/pyproject.toml +1 -1
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/pyproject.toml.orig +1 -1
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/testing/test_http_server.py +12 -6
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/LICENSE +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/README.md +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/__init__.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/exception/__init__.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/exception/client_error.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/exception/decoding_error.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/exception/http_client_error.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/exception/http_error.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/exception/invalid_argument_error.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/exception/json_error.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/exception/redirection_error.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/exception/server_error.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/exception/transport_error.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/exception/transport_timeout_error.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/http_client_interface.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/http_response_interface.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/options_defaults.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/py.typed +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/request_options.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/testing/__init__.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/testing/_fixture_request.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/testing/_fixture_response.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/testing/_fixture_routes.py +0 -0
- {xtr_http_client_contracts-5.2.0 → xtr_http_client_contracts-5.2.1}/src/xtr_http_client_contracts/testing/http_client_test_case.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xtr-http-client-contracts
|
|
3
|
-
Version: 5.2.
|
|
3
|
+
Version: 5.2.1
|
|
4
4
|
Summary: The async HTTP client contract alone: a request call, a response read on demand, typed options and the errors they raise.
|
|
5
5
|
Keywords: http,http-client,contracts,interface,protocol,asyncio
|
|
6
6
|
Author: Xterr
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "xtr-http-client-contracts"
|
|
3
|
-
version = "5.2.
|
|
3
|
+
version = "5.2.1"
|
|
4
4
|
description = "The async HTTP client contract alone: a request call, a response read on demand, typed options and the errors they raise."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -203,11 +203,17 @@ async def _end_everything_still_serving() -> None:
|
|
|
203
203
|
the accepted socket and nothing that could close it; one turn lets it reach the transport,
|
|
204
204
|
which cancelling then closes. After: losing a connection is a callback, and the sockets the
|
|
205
205
|
cancelled tasks just abandoned are still waiting for it.
|
|
206
|
+
|
|
207
|
+
The listener is still open throughout, so a connection can be accepted while this waits —
|
|
208
|
+
a probe that connects and hangs up just before the shutdown does exactly that. Its task was
|
|
209
|
+
not among those cancelled, so the whole round repeats until no other task is left; the
|
|
210
|
+
caller closes the listener straight after, with no turn of the loop in between for another
|
|
211
|
+
accept to slip through.
|
|
206
212
|
"""
|
|
207
|
-
await asyncio.sleep(0)
|
|
208
213
|
current = asyncio.current_task()
|
|
209
|
-
serving
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
+
while serving := [task for task in asyncio.all_tasks() if task is not current]:
|
|
215
|
+
await asyncio.sleep(0)
|
|
216
|
+
for task in serving:
|
|
217
|
+
_ = task.cancel()
|
|
218
|
+
_ = await asyncio.gather(*serving, return_exceptions=True)
|
|
219
|
+
await asyncio.sleep(0)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|