Conversation
Fix intermittent CI crash in test server by wrapping wfile.write calls with try/except to handle BrokenPipeError/ConnectionResetError/OSError during Python interpreter shutdown with daemon threads. Suppress ConnectionResetError in test server handler. Add 65 new tests (261 -> 326) covering previously untested API surface: - StreamResponse/AsyncStreamResponse properties (url, status_code, headers, cookies, encoding, content, text, raise_for_status) - StreamResponse.next() and AsyncStreamResponse.anext() methods - iter_bytes(chunk_size) and iter_text(chunk_size) parameters - Client/AsyncClient impersonate and impersonate_os getters with values - AsyncClient constructor params (cookie_store, referer, ca_cert_file, proxy, verify, https_only, http2_only) - Client/AsyncClient property setters (auth, auth_bearer, params, timeout) - request() method with JSON/content/form_data body variants - Response.encoding setter (sync and async) - StatusError args containing status code - Module-level verify parameter - Async raise_for_status for 500 status
- Fix deprecated typing imports (Optional[X] -> X | None, Dict -> dict, Tuple -> tuple, Union -> X | Y) - Remove unused typing imports (Iterator, AsyncIterator, Optional) - Fix import sorting in examples and stub file - Remove f-string without placeholders in benchmark/run.py - Fix useless attribute access (B018) in benchmark/benchmark.py - Fix long lines (E501) in benchmark/benchmark.py - Reformat all files with ruff format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
primp.pyitype annotations (Optional →X | None, Dict →dict, Tuple →tuple, Union →X | Y), fix ruff/mypy lint errors, and reformat all Python files