A next generation HTTP client for Python. 🦋
This report summarizes scanner evidence for encode/httpx, a Python project with 15,799 GitHub stars. SynthScan examined 33,286 lines of code across 100 source files, recording 437 pattern matches distributed across 15 syntactic categories. The legacy adjusted pattern signal is 14.8 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-11-17.
Can maintainers explain intent, assumptions, and trade-offs? 323 finding(s).
Are imports declared and package/API names verified? 76 finding(s).
Are wrappers, guards, and repeated structures necessary? 327 finding(s).
Which changes need focused human review? 437 finding(s).
Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 437 distinct pattern matches across 15 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_utils.py | 31 | def test_bad_utf_like_encoding(): | CODE |
| LOW | tests/test_utils.py | 68 | def test_logging_redirect_chain(server, caplog): | CODE |
| LOW | tests/test_utils.py | 109 | def test_get_environment_proxies(environment, proxies): | CODE |
| LOW | tests/conftest.py | 208 | def cert_encrypted_private_key_file(localhost_cert): | CODE |
| LOW | tests/test_auth.py | 120 | def test_digest_auth_setting_cookie_in_request(): | CODE |
| LOW | tests/test_timeouts.py | 48 | async def test_async_client_new_request_send_timeout(server): | CODE |
| LOW | tests/test_exported_members.py | 4 | def test_all_imports_are_exported() -> None: | CODE |
| LOW | tests/test_asgi.py | 84 | async def test_asgi_transport_no_body(): | CODE |
| LOW⚡ | tests/test_asgi.py | 104 | async def test_asgi_urlencoded_path(): | CODE |
| LOW⚡ | tests/test_asgi.py | 126 | async def test_asgi_raw_path_should_not_include_querystring_portion(): | CODE |
| LOW | tests/test_asgi.py | 176 | async def test_asgi_exc_after_response(): | CODE |
| LOW | tests/test_asgi.py | 184 | async def test_asgi_disconnect_after_response_complete(): | CODE |
| LOW | tests/test_exceptions.py | 14 | def test_httpcore_all_exceptions_mapped() -> None: | CODE |
| LOW | tests/test_exceptions.py | 39 | def test_httpcore_exception_mapping(server: TestServer) -> None: | CODE |
| LOW | tests/test_decoders.py | 216 | def test_decoders_empty_cases(header_value): | CODE |
| LOW | tests/test_decoders.py | 244 | async def test_text_decoder_with_autodetect(data, encoding): | CODE |
| LOW | tests/test_decoders.py | 267 | async def test_text_decoder_known_encoding(): | CODE |
| LOW | tests/test_decoders.py | 283 | def test_text_decoder_empty_cases(): | CODE |
| LOW | tests/test_decoders.py | 296 | def test_streaming_text_decoder( | CODE |
| LOW | tests/test_decoders.py | 346 | def test_invalid_content_encoding_header(): | CODE |
| LOW⚡ | tests/test_config.py | 17 | def test_load_ssl_config_verify_non_existing_file(): | CODE |
| LOW⚡ | tests/test_config.py | 23 | def test_load_ssl_with_keylog(monkeypatch: typing.Any) -> None: | CODE |
| LOW⚡ | tests/test_config.py | 29 | def test_load_ssl_config_verify_existing_file(): | CODE |
| LOW⚡ | tests/test_config.py | 36 | def test_load_ssl_config_verify_directory(): | CODE |
| LOW⚡ | tests/test_config.py | 43 | def test_load_ssl_config_cert_and_key(cert_pem_file, cert_private_key_file): | CODE |
| LOW⚡ | tests/test_config.py | 51 | def test_load_ssl_config_cert_and_encrypted_key( | CODE |
| LOW⚡ | tests/test_config.py | 60 | def test_load_ssl_config_cert_and_key_invalid_password( | CODE |
| LOW⚡ | tests/test_config.py | 70 | def test_load_ssl_config_cert_without_key_raises(cert_pem_file): | CODE |
| LOW⚡ | tests/test_config.py | 76 | def test_load_ssl_config_no_verify(): | CODE |
| LOW | tests/test_config.py | 108 | def test_timeout_all_parameters_set(): | CODE |
| LOW | tests/test_config.py | 113 | def test_timeout_from_nothing(): | CODE |
| LOW⚡ | tests/test_config.py | 126 | def test_timeout_from_one_none_value(): | CODE |
| LOW⚡ | tests/test_config.py | 131 | def test_timeout_from_one_value(): | CODE |
| LOW⚡ | tests/test_config.py | 136 | def test_timeout_from_one_value_and_default(): | CODE |
| LOW⚡ | tests/test_config.py | 141 | def test_timeout_missing_default(): | CODE |
| LOW⚡ | tests/test_config.py | 151 | def test_timeout_from_config_instance(): | CODE |
| LOW | tests/test_config.py | 173 | def test_proxy_with_auth_from_url(): | CODE |
| LOW | tests/test_config.py | 182 | def test_invalid_proxy_scheme(): | CODE |
| LOW | tests/test_content.py | 66 | async def test_async_bytesio_content(): | CODE |
| LOW | tests/test_content.py | 256 | async def test_multipart_files_content(): | CODE |
| LOW | tests/test_content.py | 299 | async def test_multipart_data_and_files_content(): | CODE |
| LOW | tests/test_content.py | 368 | async def test_multipart_multiple_files_single_input_content(): | CODE |
| LOW | tests/test_content.py | 419 | async def test_response_empty_content(): | CODE |
| LOW | tests/test_content.py | 433 | async def test_response_bytes_content(): | CODE |
| LOW | tests/test_content.py | 447 | async def test_response_iterator_content(): | CODE |
| LOW | tests/test_content.py | 466 | async def test_response_aiterator_content(): | CODE |
| LOW⚡ | tests/test_content.py | 484 | def test_response_invalid_argument(): | CODE |
| LOW⚡ | tests/test_content.py | 489 | def test_ensure_ascii_false_with_french_characters(): | CODE |
| LOW⚡ | tests/test_content.py | 498 | def test_separators_for_compact_json(): | CODE |
| LOW⚡ | tests/test_status_codes.py | 10 | def test_status_code_value_lookup(): | CODE |
| LOW⚡ | tests/test_status_codes.py | 14 | def test_status_code_phrase_lookup(): | CODE |
| LOW⚡ | tests/test_status_codes.py | 18 | def test_lowercase_status_code(): | CODE |
| LOW⚡ | tests/test_status_codes.py | 22 | def test_reason_phrase_for_status_code(): | CODE |
| LOW⚡ | tests/test_status_codes.py | 26 | def test_reason_phrase_for_unknown_status_code(): | CODE |
| LOW | tests/test_multipart.py | 57 | def test_multipart_explicit_boundary(header: str) -> None: | CODE |
| LOW | tests/test_multipart.py | 86 | def test_multipart_header_without_boundary(header: str) -> None: | CODE |
| LOW | tests/test_multipart.py | 98 | def test_multipart_invalid_key(key): | CODE |
| LOW | tests/test_multipart.py | 114 | def test_multipart_invalid_value(value): | CODE |
| LOW | tests/test_multipart.py | 124 | def test_multipart_file_tuple(): | CODE |
| LOW | tests/test_multipart.py | 153 | def test_multipart_file_tuple_headers(file_content_type: str | None) -> None: | CODE |
| 202 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_exceptions.py | 1 | CODE | |
| LOW | tests/test_decoders.py | 1 | CODE | |
| LOW | tests/test_multipart.py | 1 | CODE | |
| LOW | tests/test_wsgi.py | 1 | CODE | |
| LOW | tests/client/test_async_client.py | 1 | CODE | |
| LOW | tests/client/test_client.py | 1 | CODE | |
| LOW | httpx/_decoders.py | 7 | CODE | |
| LOW | httpx/_types.py | 25 | CODE | |
| LOW | httpx/_types.py | 26 | CODE | |
| LOW | httpx/_types.py | 26 | CODE | |
| LOW | httpx/_types.py | 27 | CODE | |
| LOW | httpx/_types.py | 27 | CODE | |
| LOW | httpx/_types.py | 27 | CODE | |
| LOW | httpx/_types.py | 28 | CODE | |
| LOW | httpx/_types.py | 28 | CODE | |
| LOW | httpx/_main.py | 1 | CODE | |
| LOW | httpx/_urls.py | 1 | CODE | |
| LOW | httpx/_api.py | 1 | CODE | |
| LOW | httpx/_multipart.py | 1 | CODE | |
| LOW | httpx/__init__.py | 1 | CODE | |
| LOW | httpx/__init__.py | 1 | CODE | |
| LOW | httpx/__init__.py | 1 | CODE | |
| LOW | httpx/__init__.py | 2 | CODE | |
| LOW | httpx/__init__.py | 3 | CODE | |
| LOW | httpx/__init__.py | 4 | CODE | |
| LOW | httpx/__init__.py | 5 | CODE | |
| LOW | httpx/__init__.py | 6 | CODE | |
| LOW | httpx/__init__.py | 7 | CODE | |
| LOW | httpx/__init__.py | 8 | CODE | |
| LOW | httpx/__init__.py | 9 | CODE | |
| LOW | httpx/__init__.py | 10 | CODE | |
| LOW | httpx/__init__.py | 11 | CODE | |
| LOW | httpx/__init__.py | 12 | CODE | |
| LOW | httpx/__init__.py | 15 | CODE | |
| LOW | httpx/_content.py | 1 | CODE | |
| LOW | httpx/_client.py | 1 | CODE | |
| LOW | httpx/_client.py | 678 | CODE | |
| LOW | httpx/_client.py | 1392 | CODE | |
| LOW | httpx/_urlparse.py | 19 | CODE | |
| LOW | httpx/_models.py | 1 | CODE | |
| LOW | httpx/_config.py | 1 | CODE | |
| LOW | httpx/_status_codes.py | 1 | CODE | |
| LOW | httpx/_exceptions.py | 34 | CODE | |
| LOW | httpx/_auth.py | 1 | CODE | |
| LOW | httpx/_utils.py | 1 | CODE | |
| LOW | httpx/_transports/asgi.py | 1 | CODE | |
| LOW | httpx/_transports/__init__.py | 1 | CODE | |
| LOW | httpx/_transports/__init__.py | 2 | CODE | |
| LOW | httpx/_transports/__init__.py | 3 | CODE | |
| LOW | httpx/_transports/__init__.py | 4 | CODE | |
| LOW | httpx/_transports/__init__.py | 5 | CODE | |
| LOW | httpx/_transports/default.py | 27 | CODE | |
| LOW | httpx/_transports/default.py | 189 | CODE | |
| LOW | httpx/_transports/default.py | 333 | CODE | |
| LOW | httpx/_transports/base.py | 1 | CODE | |
| LOW | httpx/_transports/mock.py | 1 | CODE | |
| LOW | httpx/_transports/wsgi.py | 1 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | httpx/_api.py | 39 | CODE | |
| LOW | httpx/_api.py | 124 | CODE | |
| LOW | httpx/_api.py | 174 | CODE | |
| LOW | httpx/_api.py | 210 | CODE | |
| LOW | httpx/_api.py | 246 | CODE | |
| LOW | httpx/_api.py | 282 | CODE | |
| LOW | httpx/_api.py | 323 | CODE | |
| LOW | httpx/_api.py | 364 | CODE | |
| LOW | httpx/_api.py | 405 | CODE | |
| LOW | httpx/_client.py | 189 | CODE | |
| LOW | httpx/_client.py | 340 | CODE | |
| LOW | httpx/_client.py | 639 | CODE | |
| LOW | httpx/_client.py | 771 | CODE | |
| LOW | httpx/_client.py | 828 | CODE | |
| LOW | httpx/_client.py | 1123 | CODE | |
| LOW | httpx/_client.py | 1160 | CODE | |
| LOW | httpx/_client.py | 1197 | CODE | |
| LOW | httpx/_client.py | 1353 | CODE | |
| LOW | httpx/_client.py | 1485 | CODE | |
| LOW | httpx/_client.py | 1543 | CODE | |
| LOW | httpx/_client.py | 1838 | CODE | |
| LOW | httpx/_client.py | 1875 | CODE | |
| LOW | httpx/_client.py | 1912 | CODE | |
| LOW | httpx/_models.py | 383 | CODE | |
| LOW | httpx/_models.py | 516 | CODE | |
| LOW | httpx/_transports/default.py | 136 | CODE | |
| LOW | httpx/_transports/default.py | 280 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 59 | CODE | |
| LOW | tests/client/test_redirects.py | 8 | CODE | |
| LOW | tests/client/test_client.py | 134 | CODE | |
| LOW | httpx/_main.py | 194 | CODE | |
| LOW | httpx/_main.py | 212 | CODE | |
| LOW | httpx/_main.py | 452 | CODE | |
| LOW | httpx/_urls.py | 425 | CODE | |
| LOW | httpx/_content.py | 186 | CODE | |
| LOW | httpx/_content.py | 221 | CODE | |
| LOW | httpx/_client.py | 445 | CODE | |
| LOW | httpx/_client.py | 930 | CODE | |
| LOW | httpx/_client.py | 1645 | CODE | |
| LOW | httpx/_urlparse.py | 348 | CODE | |
| LOW | httpx/_urlparse.py | 447 | CODE | |
| LOW | httpx/_models.py | 144 | CODE | |
| LOW | httpx/_models.py | 167 | CODE | |
| LOW | httpx/_models.py | 653 | CODE | |
| LOW | httpx/_models.py | 884 | CODE | |
| LOW | httpx/_models.py | 1084 | CODE | |
| LOW | httpx/_models.py | 1143 | CODE | |
| LOW | httpx/_config.py | 23 | CODE | |
| LOW | httpx/_config.py | 86 | CODE | |
| LOW | httpx/_utils.py | 30 | CODE | |
| LOW | httpx/_transports/default.py | 136 | CODE | |
| LOW | httpx/_transports/default.py | 280 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_auth.py | 210 | 'Digest realm="http-auth@example.org", ' | CODE |
| LOW | tests/test_auth.py | 223 | assert 'realm="http-auth@example.org"' in request.headers["Authorization"] | CODE |
| LOW | tests/test_auth.py | 270 | 'Digest realm="http-auth@example.org", ' | CODE |
| LOW | tests/test_auth.py | 283 | assert 'realm="http-auth@example.org"' in request.headers["Authorization"] | CODE |
| LOW⚡ | tests/test_asgi.py | 107 | url = httpx.URL("http://www.example.org/").copy_with(path="/user@example.org") | CODE |
| LOW⚡ | tests/test_asgi.py | 111 | assert response.json() == {"path": "/user@example.org"} | CODE |
| LOW⚡ | tests/test_asgi.py | 118 | url = httpx.URL("http://www.example.org/").copy_with(path="/user@example.org") | CODE |
| LOW⚡ | tests/test_asgi.py | 122 | assert response.json() == {"raw_path": "/user@example.org"} | CODE |
| LOW⚡ | tests/models/test_url.py | 608 | "username": "tom@example.org", | CODE |
| LOW⚡ | tests/models/test_url.py | 613 | assert str(new) == "https://tom%40example.org:abc123%40%20%@example.org" | CODE |
| LOW⚡ | tests/models/test_url.py | 614 | assert new.username == "tom@example.org" | CODE |
| LOW⚡ | tests/client/test_auth.py | 599 | 'Digest realm="httpx@example.org", qop="auth"', # missing fields | CODE |
| LOW⚡ | tests/client/test_auth.py | 600 | 'Digest realm="httpx@example.org", qop="auth,au', # malformed fields list | CODE |
| LOW⚡ | tests/client/test_auth.py | 619 | 'Digest realm="httpx@example.org", qop="auth"', # missing fields | CODE |
| LOW⚡ | tests/client/test_auth.py | 620 | 'Digest realm="httpx@example.org", qop="auth,au', # malformed fields list | CODE |
| LOW | tests/client/test_auth.py | 82 | "www-authenticate": f'Digest realm="httpx@example.org", {challenge_str}', | CODE |
| LOW | tests/client/test_auth.py | 448 | assert digest_data["realm"] == '"httpx@example.org"' | CODE |
| LOW | tests/client/test_auth.py | 482 | assert digest_data["realm"] == '"httpx@example.org"' | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | httpx/_types.py | 89 | __all__ = ["AsyncByteStream", "SyncByteStream"] | CODE |
| LOW | httpx/_urls.py | 12 | __all__ = ["URL", "QueryParams"] | CODE |
| LOW | httpx/_api.py | 26 | __all__ = [ | CODE |
| LOW | httpx/__init__.py | 29 | __all__ = [ | CODE |
| LOW | httpx/_content.py | 28 | __all__ = ["ByteStream"] | CODE |
| LOW | httpx/_client.py | 54 | __all__ = ["USE_CLIENT_DEFAULT", "AsyncClient", "Client"] | CODE |
| LOW | httpx/_client.py | 584 | def _set_timeout(self, request: Request) -> None: | CODE |
| LOW | httpx/_models.py | 51 | __all__ = ["Cookies", "Headers", "Request", "Response"] | CODE |
| LOW | httpx/_models.py | 1110 | def set_cookie_header(self, request: Request) -> None: | CODE |
| LOW | httpx/_config.py | 13 | __all__ = ["Limits", "Proxy", "Timeout", "create_ssl_context"] | CODE |
| LOW | httpx/_status_codes.py | 5 | __all__ = ["codes"] | CODE |
| LOW | httpx/_exceptions.py | 42 | __all__ = [ | CODE |
| LOW | httpx/_auth.py | 19 | __all__ = ["Auth", "BasicAuth", "DigestAuth", "FunctionAuth", "NetRCAuth"] | CODE |
| LOW | httpx/_transports/asgi.py | 26 | __all__ = ["ASGITransport"] | CODE |
| LOW | httpx/_transports/__init__.py | 7 | __all__ = [ | CODE |
| LOW | httpx/_transports/default.py | 69 | __all__ = ["AsyncHTTPTransport", "HTTPTransport"] | CODE |
| LOW | httpx/_transports/base.py | 11 | __all__ = ["AsyncBaseTransport", "BaseTransport"] | CODE |
| LOW | httpx/_transports/mock.py | 12 | __all__ = ["MockTransport"] | CODE |
| LOW | httpx/_transports/wsgi.py | 19 | __all__ = ["WSGITransport"] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/quickstart.md | 508 | print(f"An error occurred while requesting {exc.request.url!r}.") | CODE |
| MEDIUM | docs/quickstart.md | 519 | print(f"Error response {exc.response.status_code} while requesting {exc.request.url!r}.") | CODE |
| MEDIUM⚡ | docs/quickstart.md | 532 | print(f"Error while requesting {exc.request.url!r}.") | CODE |
| MEDIUM⚡ | docs/quickstart.md | 542 | print(f"An error occurred while requesting {exc.request.url!r}.") | CODE |
| MEDIUM⚡ | docs/quickstart.md | 544 | print(f"Error response {exc.response.status_code} while requesting {exc.request.url!r}.") | CODE |
| LOW | httpx/_utils.py | 232 | except Exception: | CODE |
| LOW | httpx/_utils.py | 240 | except Exception: | CODE |
| LOW | httpx/_transports/asgi.py | 171 | except Exception: # noqa: PIE-786 | CODE |
| LOW | httpx/_transports/default.py | 102 | except Exception as exc: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | httpx/_main.py | 111 | except pygments.util.ClassNotFound: # pragma: no cover | CODE |
| HIGH | httpx/_multipart.py | 211 | except io.UnsupportedOperation: | CODE |
| HIGH | httpx/_transports/asgi.py | 38 | except ImportError: # pragma: nocover | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | httpx/_urlparse.py | 215 | # --------------------------------------- | COMMENT |
| MEDIUM | httpx/_urlparse.py | 232 | # ------------------------------------------------ | COMMENT |
| MEDIUM | httpx/_urlparse.py | 264 | # ------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/client/test_async_client.py | 351 | CODE | |
| MEDIUM | httpx/_types.py | 97 | CODE | |
| MEDIUM | httpx/_types.py | 111 | CODE | |
| MEDIUM | httpx/_content.py | 104 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/client/test_redirects.py | 346 | def handle_request(self, request: httpx.Request) -> httpx.Response: | CODE |
| LOW | httpx/_transports/default.py | 230 | def handle_request( | CODE |
| LOW | httpx/_transports/base.py | 26 | def handle_request(self, request: Request) -> Response: | CODE |
| LOW | httpx/_transports/mock.py | 19 | def handle_request( | CODE |
| LOW | httpx/_transports/wsgi.py | 91 | def handle_request(self, request: Request) -> Response: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/client/test_redirects.py | 396 | "session=null; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT; " | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/advanced/extensions.md | 41 | ```python | COMMENT |
| LOW | httpx/_models.py | 421 | # Load the request body, except for streaming content. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/models/test_url.py | 93 | # WARNING: This has the incorrect behaviour, adding the test as an interim step. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | httpx/_auth.py | 267 | # TODO: implement auth-int | COMMENT |