diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c161cc97..381ecf4c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -250,6 +250,103 @@ jobs: - name: Install and smoke-test wheel in a clean environment run: python scripts/wheel_smoke.py --wheel-dir dist + compat-httpx: + name: HTTPX compatibility (py${{ matrix.python-version }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.12"] + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache cargo registry and target + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-compat-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} + restore-keys: | + ${{ runner.os }}-compat-cargo- + + - name: Create virtualenv + run: python -m venv .venv + + - name: Install dependencies + run: | + source .venv/bin/activate + pip install -r compat/httpx/0.28.1/requirements.txt + pip install maturin pytest pytest-asyncio + + - name: Verify httpx version + run: | + source .venv/bin/activate + python -c "import httpx; assert httpx.__version__ == '0.28.1', f'Expected 0.28.1, got {httpx.__version__}'" + + - name: Build and install eggfetch + env: + PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1" + run: | + source .venv/bin/activate + maturin develop -m crates/eggfetch-python/Cargo.toml + + - name: Validate compatibility profile + run: | + source .venv/bin/activate + python scripts/validate_httpx_compat_profile.py compat/httpx/0.28.1 + + - name: Run required compatibility tests + env: + EGGFETCH_COMPAT_REQUIRED: "1" + EGGFETCH_COMPAT_PROFILE: "httpx/0.28.1" + run: | + source .venv/bin/activate + pytest crates/eggfetch-python/tests/compat/ -v --strict-markers --timeout=30 + + - name: Generate eggfetch API manifest + run: | + source .venv/bin/activate + python scripts/generate_httpx_api_manifest.py --package eggfetch --output /tmp/eggfetch-manifest.json + + - name: Generate reference API manifest + run: | + source .venv/bin/activate + python scripts/generate_httpx_api_manifest.py --package httpx --output /tmp/httpx-manifest.json + + - name: Compare manifests + run: | + source .venv/bin/activate + python scripts/compare_httpx_api_manifest.py \ + --reference /tmp/httpx-manifest.json \ + --candidate /tmp/eggfetch-manifest.json \ + --allowed compat/httpx/0.28.1/allowed-differences.toml + + - name: Lint compatibility claims in docs + run: | + source .venv/bin/activate + python scripts/check_compatibility_claims.py \ + docs/reference/compatibility.md \ + docs/migration/from-httpx.md + + - name: Upload compatibility reports + if: always() + uses: actions/upload-artifact@v4 + with: + name: compat-reports-${{ matrix.python-version }} + path: | + /tmp/httpx-manifest.json + /tmp/eggfetch-manifest.json + # ────────────────────────────────────────────────────────────────────── # Required CI Gate — fail-closed merge prerequisite # ────────────────────────────────────────────────────────────────────── @@ -257,7 +354,7 @@ jobs: name: Required CI Gate runs-on: ubuntu-latest if: ${{ always() }} - needs: [rust-format, rust-lint, rust-msrv, rust-test, rust-doc, docs-syntax, docs-runtime, resource-monitor, python, wheel-smoke] + needs: [rust-format, rust-lint, rust-msrv, rust-test, rust-doc, docs-syntax, docs-runtime, resource-monitor, python, wheel-smoke, compat-httpx] steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 @@ -277,6 +374,7 @@ jobs: ("resource-monitor", "${{ needs.resource-monitor.result }}"), ("python", "${{ needs.python.result }}"), ("wheel-smoke", "${{ needs.wheel-smoke.result }}"), + ("compat-httpx", "${{ needs.compat-httpx.result }}"), ] results = {} @@ -305,8 +403,9 @@ jobs: ("Docs syntax", results["docs-syntax"]), ("Docs runtime", results["docs-runtime"]), ("Resource monitor", results["resource-monitor"]), - ("Python tests (12)", results["python"]), - ("Wheel smoke (3 OS)", results["wheel-smoke"]), + ("Python tests (12)", results["python"]), + ("Wheel smoke (3 OS)", results["wheel-smoke"]), + ("HTTPX compat", results["compat-httpx"]), ] for label, status in display: fh.write(f"| {label} | {status} |\n") diff --git a/AGENTS.md b/AGENTS.md index 536cf8fb..367fa29b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -17,6 +17,21 @@ cargo check -p eggfetch-core --all-features cd crates/eggfetch-python && maturin develop python -m pytest -p pytest_asyncio +# HTTPX compatibility tests (requires httpx==0.28.1) +pip install -r compat/httpx/0.28.1/requirements.txt +EGGFETCH_COMPAT_REQUIRED=1 pytest crates/eggfetch-python/tests/compat/ -v --strict-markers + +# Validate compatibility profile +python scripts/validate_httpx_compat_profile.py compat/httpx/0.28.1 + +# Generate and compare API manifests +python scripts/generate_httpx_api_manifest.py --package httpx --output /tmp/httpx.json +python scripts/generate_httpx_api_manifest.py --package eggfetch --output /tmp/eggfetch.json +python scripts/compare_httpx_api_manifest.py \ + --reference /tmp/httpx.json \ + --candidate /tmp/eggfetch.json \ + --allowed compat/httpx/0.28.1/allowed-differences.toml + # Resource regression check cargo build --release -p eggfetch-bench --bin resource_monitor ./target/release/resource_monitor @@ -83,6 +98,8 @@ cargo test -p eggfetch-core --no-default-features --features http1,tls-rustls,pr cargo test -p eggfetch-core --no-default-features --features http1,tls-rustls,http3 ``` +The HTTPX compatibility test suite lives in `crates/eggfetch-python/tests/compat/` and requires `httpx==0.28.1`. Run with `EGGFETCH_COMPAT_REQUIRED=1` for fail-closed behavior. The compatibility profile is in `compat/httpx/0.28.1/`. + CI matrix: Python 3.10-3.13 on Ubuntu, macOS, Windows. CI must install `pytest-asyncio` explicitly. ## Security diff --git a/README.md b/README.md index a1f79d14..67935d5e 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,23 @@ Note: HTTP/3 (QUIC) is now available as an experimental feature behind the `http See [plans/ROADMAP.md](plans/ROADMAP.md) for the full roadmap and compatibility policy. +## HTTPX Compatibility + +eggfetch targets HTTPX 0.28.1 compatibility in measured phases. Phase 0 establishes the compatibility contract: + +- **Pinned reference**: `httpx==0.28.1` with a machine-readable compatibility profile in `compat/httpx/0.28.1/` +- **API manifest comparison**: Automated generators compare eggfetch's public API surface against HTTPX's golden manifest +- **Required differential tests**: Fail-closed compatibility tests that cannot be skipped in CI +- **Allowed differences**: Every intentional behavioral difference is documented, categorized, and linked to tests + +Key differences from HTTPX: +- **Redirect default**: eggfetch does NOT follow redirects by default (HTTPX does) +- **Proxy env vars**: eggfetch does not read `HTTP_PROXY`/`HTTPS_PROXY` (HTTPX does) +- **Event hooks**: Not yet implemented (tracked as required-later) +- **WSGI/ASGI transports**: Not applicable (eggfetch is a network client) + +See [`compat/httpx/0.28.1/`](compat/httpx/0.28.1/) for the full profile and [`docs/reference/compatibility.md`](docs/reference/compatibility.md) for the feature matrix. + ## Target API Shapes The Python API targets familiar requests/httpx patterns: diff --git a/compat/httpx/0.28.1/README.md b/compat/httpx/0.28.1/README.md new file mode 100644 index 00000000..05dcae60 --- /dev/null +++ b/compat/httpx/0.28.1/README.md @@ -0,0 +1,47 @@ +# HTTPX 0.28.1 Compatibility Profile + +This directory contains the machine-readable compatibility profile for +HTTPX 0.28.1 drop-in compatibility (Phase 0). + +## Files + +- `profile.toml` — Defines the reference package, supported surfaces, and categories +- `allowed-differences.toml` — Registry of reviewed, allowed behavioral differences +- `reference-api.json` — Golden manifest of HTTPX 0.28.1 public API (generated) + +## Usage + +Validate the profile: +```bash +python scripts/validate_httpx_compat_profile.py compat/httpx/0.28.1 +``` + +Generate the reference manifest: +```bash +python scripts/generate_httpx_api_manifest.py --package httpx --output compat/httpx/0.28.1/reference-api.json +``` + +Generate the eggfetch manifest: +```bash +python scripts/generate_httpx_api_manifest.py --package eggfetch --output /tmp/eggfetch.json +``` + +Compare manifests: +```bash +python scripts/compare_httpx_api_manifest.py \ + --reference compat/httpx/0.28.1/reference-api.json \ + --candidate /tmp/eggfetch.json \ + --allowed compat/httpx/0.28.1/allowed-differences.toml +``` + +## Categories + +- `required-now` — Must match for current stage +- `required-later` — Accepted gap assigned to later roadmap phase +- `intentional-difference` — Reviewed and explicitly allowed +- `not-public` — Excluded from contract +- `not-applicable` — Reference feature cannot apply to current product stage + +## Status + +This profile targets HTTPX 0.28.1. The compatibility stage is **Phase 0**. diff --git a/compat/httpx/0.28.1/allowed-differences.toml b/compat/httpx/0.28.1/allowed-differences.toml new file mode 100644 index 00000000..d8e7452c --- /dev/null +++ b/compat/httpx/0.28.1/allowed-differences.toml @@ -0,0 +1,137 @@ +# Allowed differences between HTTPX 0.28.1 and eggfetch +# Each entry must have a stable ID, category, and linked tests. + +[[difference]] +id = "REDIRECT-DEFAULT-001" +category = "intentional-difference" +symbol = "httpx.Client(follow_redirects=...)" +behavior-case = "redirect-default" +reference-behavior = "HTTPX follows redirects by default (follow_redirects=True)" +eggfetch-behavior = "eggfetch does NOT follow redirects by default (follow_redirects=True required)" +rationale = "Security-first default; prevents accidental redirects to unexpected hosts" +compatibility-stage-impact = "phase-0" +security-improvement = true +migration-impact = "Users must add follow_redirects=True explicitly" +owner = "eggfetch-team" +review-milestone = "phase-0" +tests = ["test_differential.py::TestRedirectDefault", "test_differential.py::TestKnownDifferences::test_redirect_default_differs"] + +[[difference]] +id = "PROXY-ENV-001" +category = "required-later" +symbol = "httpx.Client(proxy=...)" +behavior-case = "proxy-env-vars" +reference-behavior = "HTTPX reads HTTP_PROXY/HTTPS_PROXY/NO_PROXY env vars" +eggfetch-behavior = "eggfetch does not read proxy env vars; proxy= parameter is explicit only" +rationale = "Not yet implemented; tracked as roadmap item" +compatibility-stage-impact = "phase-0" +security-improvement = false +migration-impact = "Users must pass proxy= explicitly" +owner = "eggfetch-team" +review-milestone = "phase-1" +tests = ["test_differential.py::TestKnownDifferences::test_proxy_config_differs"] + +[[difference]] +id = "TIMEOUT-TUPLE-001" +category = "intentional-difference" +symbol = "httpx.Timeout(...)" +behavior-case = "timeout-api" +reference-behavior = "HTTPX accepts Timeout() with named phase parameters" +eggfetch-behavior = "eggfetch accepts Timeout() with named phase parameters (compatible)" +rationale = "API shape is compatible; requests tuple syntax is different" +compatibility-stage-impact = "phase-0" +security-improvement = false +migration-impact = "Minimal; Timeout() API is compatible" +owner = "eggfetch-team" +review-milestone = "phase-0" +tests = ["test_differential.py::TestTimeout"] + +[[difference]] +id = "EVENT-HOOKS-001" +category = "required-later" +symbol = "httpx.EventHooks / httpx.Client(event_hooks=...)" +behavior-case = "event-hooks" +reference-behavior = "HTTPX supports event_hooks={'request': [...], 'response': [...]}" +eggfetch-behavior = "eggfetch does not support event hooks" +rationale = "Not yet implemented; tracked as roadmap item" +compatibility-stage-impact = "phase-0" +security-improvement = false +migration-impact = "Users needing event hooks must use other mechanisms" +owner = "eggfetch-team" +review-milestone = "phase-1" +tests = [] + +[[difference]] +id = "TRANSPORTS-001" +category = "required-later" +symbol = "httpx.ASGITransport / httpx.WSGITransport" +behavior-case = "in-process-transports" +reference-behavior = "HTTPX supports WSGI/ASGI in-process transports" +eggfetch-behavior = "eggfetch does not support in-process transports" +rationale = "eggfetch is a network client, not a testing tool" +compatibility-stage-impact = "phase-0" +security-improvement = false +migration-impact = "Use a real test server instead" +owner = "eggfetch-team" +review-milestone = "phase-2" +tests = [] + +[[difference]] +id = "MOUNTS-001" +category = "required-later" +symbol = "httpx.Client(mounts=...)" +behavior-case = "per-host-transports" +reference-behavior = "HTTPX supports per-host transport mounts" +eggfetch-behavior = "eggfetch does not support per-host transport mounts" +rationale = "Not yet implemented; tracked as roadmap item" +compatibility-stage-impact = "phase-0" +security-improvement = false +migration-impact = "Users needing per-host routing must handle externally" +owner = "eggfetch-team" +review-milestone = "phase-2" +tests = [] + +[[difference]] +id = "TRIO-ANYIO-001" +category = "not-applicable" +symbol = "httpx.AsyncClient(transport=...)" +behavior-case = "trio-anyio" +reference-behavior = "HTTPX supports Trio and AnyIO backends" +eggfetch-behavior = "eggfetch uses asyncio only" +rationale = "eggfetch is built on tokio (Rust); asyncio integration is the Python path" +compatibility-stage-impact = "phase-0" +security-improvement = false +migration-impact = "None for asyncio users" +owner = "eggfetch-team" +review-milestone = "phase-0" +tests = [] + +[[difference]] +id = "EXCEPTION-NAMES-001" +category = "intentional-difference" +symbol = "httpx.HTTPError / eggfetch.EggfetchError" +behavior-case = "exception-hierarchy" +reference-behavior = "HTTPX uses httpx.HTTPError as base exception" +eggfetch-behavior = "eggfetch uses EggfetchError as base exception" +rationale = "Different base exception name; subclass structure is compatible" +compatibility-stage-impact = "phase-0" +security-improvement = false +migration-impact = "Catch EggfetchError instead of HTTPError" +owner = "eggfetch-team" +review-milestone = "phase-0" +tests = ["test_response_compat.py"] + +[[difference]] +id = "RAISE-FOR-STATUS-001" +category = "intentional-difference" +symbol = "httpx.Response.raise_for_status()" +behavior-case = "raise-for-status-return" +reference-behavior = "HTTPX Response.raise_for_status() returns the response" +eggfetch-behavior = "eggfetch Response.raise_for_status() returns the response" +rationale = "API is compatible; both return the response object" +compatibility-stage-impact = "phase-0" +security-improvement = false +migration-impact = "None" +owner = "eggfetch-team" +review-milestone = "phase-0" +tests = ["test_response_compat.py"] diff --git a/compat/httpx/0.28.1/profile.toml b/compat/httpx/0.28.1/profile.toml new file mode 100644 index 00000000..4d680ba5 --- /dev/null +++ b/compat/httpx/0.28.1/profile.toml @@ -0,0 +1,41 @@ +[compatibility-profile] +schema-version = "1" +generator = "eggfetch-compat-profile" +version = "1" +created = "2026-07-21" +reference = "httpx==0.28.1" +stage = "phase-0" +status = "in-progress" + +[reference] +distribution = "httpx" +version = "0.28.1" +python-versions = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +sync-backend = "httpcore" +async-backend = "httpcore" + +[eggfetch] +distribution = "eggfetch" +python-versions = ["3.10", "3.11", "3.12", "3.13"] +sync-backend = "rust-tokio" +async-backend = "rust-tokio" + +[modules] +# Public modules included in the compatibility contract +public = ["httpx"] +# Private modules excluded (prefixed with _) +private-excluded = ["_transports", "_content", "_models", "_decoders", "_exceptions", "_multipart", "_urlparse", "_config"] + +[feature-extras] +# HTTPX optional extras and their eggfetch equivalents +http2 = { httpx = "httpx[http2]", eggfetch = "http2=True" } +brotli = { httpx = "httpx[brotli]", eggfetch = "compression-brotli feature" } +zstd = { httpx = "httpx[zstd]", eggfetch = "compression-zstd feature" } +socks = { httpx = "httpx[socks]", eggfetch = "not-supported" } + +[compatibility-categories] +required-now = "Must match for current stage" +required-later = "Accepted gap assigned to later roadmap phase" +intentional-difference = "Reviewed and explicitly allowed" +not-public = "Excluded from contract" +not-applicable = "Reference feature cannot apply to current product stage" diff --git a/compat/httpx/0.28.1/reference-api.json b/compat/httpx/0.28.1/reference-api.json new file mode 100644 index 00000000..77f3e0a6 --- /dev/null +++ b/compat/httpx/0.28.1/reference-api.json @@ -0,0 +1,8282 @@ +{ + "schema_version": "1", + "package": "httpx", + "version": "0.28.1", + "symbols": [ + { + "name": "ASGITransport", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "app", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'_ASGIApp'" + }, + { + "name": "raise_app_exceptions", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "True", + "annotation": "'bool'" + }, + { + "name": "root_path", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "''", + "annotation": "'str'" + }, + { + "name": "client", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "('127.0.0.1', 123)", + "annotation": "'tuple[str, int]'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "AsyncBaseTransport" + ], + "mro": [ + "ASGITransport", + "AsyncBaseTransport" + ], + "methods": [ + { + "name": "aclose", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "handle_async_request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'Response'" + } + } + ] + }, + { + "name": "AsyncBaseTransport", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "args", + "kind": "VAR_POSITIONAL" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD" + } + ], + "return_annotation": null + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "object" + ], + "mro": [ + "AsyncBaseTransport" + ], + "methods": [ + { + "name": "aclose", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "handle_async_request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'Response'" + } + } + ] + }, + { + "name": "AsyncByteStream", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "args", + "kind": "VAR_POSITIONAL" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD" + } + ], + "return_annotation": null + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "object" + ], + "mro": [ + "AsyncByteStream" + ], + "methods": [ + { + "name": "aclose", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "None" + } + } + ] + }, + { + "name": "AsyncClient", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'AuthTypes | None'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "verify", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'ssl.SSLContext | str | bool'" + }, + { + "name": "cert", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CertTypes | None'" + }, + { + "name": "http1", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'bool'" + }, + { + "name": "http2", + "kind": "KEYWORD_ONLY", + "default": "False", + "annotation": "'bool'" + }, + { + "name": "proxy", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'ProxyTypes | None'" + }, + { + "name": "mounts", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'None | typing.Mapping[str, AsyncBaseTransport | None]'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "Timeout(timeout=5.0)", + "annotation": "'TimeoutTypes'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "False", + "annotation": "'bool'" + }, + { + "name": "limits", + "kind": "KEYWORD_ONLY", + "default": "Limits(max_connections=100, max_keepalive_connections=20, keepalive_expiry=5.0)", + "annotation": "'Limits'" + }, + { + "name": "max_redirects", + "kind": "KEYWORD_ONLY", + "default": "20", + "annotation": "'int'" + }, + { + "name": "event_hooks", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'None | typing.Mapping[str, list[EventHook]]'" + }, + { + "name": "base_url", + "kind": "KEYWORD_ONLY", + "default": "''", + "annotation": "'URL | str'" + }, + { + "name": "transport", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'AsyncBaseTransport | None'" + }, + { + "name": "trust_env", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'bool'" + }, + { + "name": "default_encoding", + "kind": "KEYWORD_ONLY", + "default": "'utf-8'", + "annotation": "'str | typing.Callable[[bytes], str]'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "BaseClient" + ], + "mro": [ + "AsyncClient", + "BaseClient" + ], + "methods": [ + { + "name": "aclose", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "build_request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "method", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestContent | None'" + }, + { + "name": "data", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestData | None'" + }, + { + "name": "files", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestFiles | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any | None'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'Request'" + } + }, + { + "name": "delete", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "get", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault | None'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "head", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "options", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "patch", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestContent | None'" + }, + { + "name": "data", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestData | None'" + }, + { + "name": "files", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestFiles | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any | None'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "post", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestContent | None'" + }, + { + "name": "data", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestData | None'" + }, + { + "name": "files", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestFiles | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any | None'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "put", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestContent | None'" + }, + { + "name": "data", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestData | None'" + }, + { + "name": "files", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestFiles | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any | None'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "method", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestContent | None'" + }, + { + "name": "data", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestData | None'" + }, + { + "name": "files", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestFiles | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any | None'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault | None'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "send", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + }, + { + "name": "stream", + "kind": "KEYWORD_ONLY", + "default": "False", + "annotation": "'bool'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault | None'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "stream", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "method", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestContent | None'" + }, + { + "name": "data", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestData | None'" + }, + { + "name": "files", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestFiles | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any | None'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault | None'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'typing.AsyncIterator[Response]'" + } + } + ], + "properties": [ + { + "name": "auth", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Auth | None'" + } + }, + { + "name": "base_url", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'URL'" + } + }, + { + "name": "cookies", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Cookies'" + } + }, + { + "name": "event_hooks", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'dict[str, list[EventHook]]'" + } + }, + { + "name": "headers", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Headers'" + } + }, + { + "name": "is_closed", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bool'" + } + }, + { + "name": "params", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'QueryParams'" + } + }, + { + "name": "timeout", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Timeout'" + } + }, + { + "name": "trust_env", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bool'" + } + } + ] + }, + { + "name": "AsyncHTTPTransport", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "verify", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "True", + "annotation": "'ssl.SSLContext | str | bool'" + }, + { + "name": "cert", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'CertTypes | None'" + }, + { + "name": "trust_env", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "True", + "annotation": "'bool'" + }, + { + "name": "http1", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "True", + "annotation": "'bool'" + }, + { + "name": "http2", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "False", + "annotation": "'bool'" + }, + { + "name": "limits", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "Limits(max_connections=100, max_keepalive_connections=20, keepalive_expiry=5.0)", + "annotation": "'Limits'" + }, + { + "name": "proxy", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'ProxyTypes | None'" + }, + { + "name": "uds", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'str | None'" + }, + { + "name": "local_address", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'str | None'" + }, + { + "name": "retries", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "0", + "annotation": "'int'" + }, + { + "name": "socket_options", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'typing.Iterable[SOCKET_OPTION] | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "AsyncBaseTransport" + ], + "mro": [ + "AsyncBaseTransport", + "AsyncHTTPTransport" + ], + "methods": [ + { + "name": "aclose", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "handle_async_request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'Response'" + } + } + ] + }, + { + "name": "Auth", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "args", + "kind": "VAR_POSITIONAL" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD" + } + ], + "return_annotation": null + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "object" + ], + "mro": [ + "Auth" + ], + "methods": [ + { + "name": "async_auth_flow", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'typing.AsyncGenerator[Request, Response]'" + } + }, + { + "name": "auth_flow", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'typing.Generator[Request, Response, None]'" + } + }, + { + "name": "sync_auth_flow", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'typing.Generator[Request, Response, None]'" + } + } + ] + }, + { + "name": "BaseTransport", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "args", + "kind": "VAR_POSITIONAL" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD" + } + ], + "return_annotation": null + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "object" + ], + "mro": [ + "BaseTransport" + ], + "methods": [ + { + "name": "close", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "handle_request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'Response'" + } + } + ] + }, + { + "name": "BasicAuth", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "username", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str | bytes'" + }, + { + "name": "password", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str | bytes'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "Auth" + ], + "mro": [ + "Auth", + "BasicAuth" + ], + "methods": [ + { + "name": "async_auth_flow", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'typing.AsyncGenerator[Request, Response]'" + } + }, + { + "name": "auth_flow", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'typing.Generator[Request, Response, None]'" + } + }, + { + "name": "sync_auth_flow", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'typing.Generator[Request, Response, None]'" + } + } + ] + }, + { + "name": "ByteStream", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "stream", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'bytes'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "AsyncByteStream", + "SyncByteStream" + ], + "mro": [ + "AsyncByteStream", + "ByteStream", + "SyncByteStream" + ], + "methods": [ + { + "name": "aclose", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "None" + } + }, + { + "name": "close", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "None" + } + } + ] + }, + { + "name": "Client", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'AuthTypes | None'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "verify", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'ssl.SSLContext | str | bool'" + }, + { + "name": "cert", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CertTypes | None'" + }, + { + "name": "trust_env", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'bool'" + }, + { + "name": "http1", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'bool'" + }, + { + "name": "http2", + "kind": "KEYWORD_ONLY", + "default": "False", + "annotation": "'bool'" + }, + { + "name": "proxy", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'ProxyTypes | None'" + }, + { + "name": "mounts", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'None | typing.Mapping[str, BaseTransport | None]'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "Timeout(timeout=5.0)", + "annotation": "'TimeoutTypes'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "False", + "annotation": "'bool'" + }, + { + "name": "limits", + "kind": "KEYWORD_ONLY", + "default": "Limits(max_connections=100, max_keepalive_connections=20, keepalive_expiry=5.0)", + "annotation": "'Limits'" + }, + { + "name": "max_redirects", + "kind": "KEYWORD_ONLY", + "default": "20", + "annotation": "'int'" + }, + { + "name": "event_hooks", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'None | typing.Mapping[str, list[EventHook]]'" + }, + { + "name": "base_url", + "kind": "KEYWORD_ONLY", + "default": "''", + "annotation": "'URL | str'" + }, + { + "name": "transport", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'BaseTransport | None'" + }, + { + "name": "default_encoding", + "kind": "KEYWORD_ONLY", + "default": "'utf-8'", + "annotation": "'str | typing.Callable[[bytes], str]'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "BaseClient" + ], + "mro": [ + "BaseClient", + "Client" + ], + "methods": [ + { + "name": "build_request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "method", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestContent | None'" + }, + { + "name": "data", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestData | None'" + }, + { + "name": "files", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestFiles | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any | None'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'Request'" + } + }, + { + "name": "close", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "delete", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "get", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault | None'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "head", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "options", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "patch", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestContent | None'" + }, + { + "name": "data", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestData | None'" + }, + { + "name": "files", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestFiles | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any | None'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "post", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestContent | None'" + }, + { + "name": "data", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestData | None'" + }, + { + "name": "files", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestFiles | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any | None'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "put", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestContent | None'" + }, + { + "name": "data", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestData | None'" + }, + { + "name": "files", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestFiles | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any | None'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "method", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestContent | None'" + }, + { + "name": "data", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestData | None'" + }, + { + "name": "files", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestFiles | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any | None'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault | None'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "send", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + }, + { + "name": "stream", + "kind": "KEYWORD_ONLY", + "default": "False", + "annotation": "'bool'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault | None'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "stream", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "method", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestContent | None'" + }, + { + "name": "data", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestData | None'" + }, + { + "name": "files", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestFiles | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any | None'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'AuthTypes | UseClientDefault | None'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'bool | UseClientDefault'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'TimeoutTypes | UseClientDefault'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'typing.Iterator[Response]'" + } + } + ], + "properties": [ + { + "name": "auth", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Auth | None'" + } + }, + { + "name": "base_url", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'URL'" + } + }, + { + "name": "cookies", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Cookies'" + } + }, + { + "name": "event_hooks", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'dict[str, list[EventHook]]'" + } + }, + { + "name": "headers", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Headers'" + } + }, + { + "name": "is_closed", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bool'" + } + }, + { + "name": "params", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'QueryParams'" + } + }, + { + "name": "timeout", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Timeout'" + } + }, + { + "name": "trust_env", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bool'" + } + } + ] + }, + { + "name": "CloseError", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "NetworkError" + ], + "mro": [ + "BaseException", + "CloseError", + "Exception", + "HTTPError", + "NetworkError", + "RequestError", + "TransportError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "ConnectError", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "NetworkError" + ], + "mro": [ + "BaseException", + "ConnectError", + "Exception", + "HTTPError", + "NetworkError", + "RequestError", + "TransportError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "ConnectTimeout", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "TimeoutException" + ], + "mro": [ + "BaseException", + "ConnectTimeout", + "Exception", + "HTTPError", + "RequestError", + "TimeoutException", + "TransportError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "CookieConflict", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "Exception" + ], + "mro": [ + "BaseException", + "CookieConflict", + "Exception" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ] + }, + { + "name": "Cookies", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "cookies", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'CookieTypes | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "Generic", + "MutableMapping" + ], + "mro": [ + "Collection", + "Container", + "Cookies", + "Generic", + "Iterable", + "Mapping", + "MutableMapping", + "Sized" + ], + "methods": [ + { + "name": "clear", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "domain", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'str | None'" + }, + { + "name": "path", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'str | None'" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "delete", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "name", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "domain", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'str | None'" + }, + { + "name": "path", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'str | None'" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "extract_cookies", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "response", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Response'" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "get", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "name", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "default", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'str | None'" + }, + { + "name": "domain", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'str | None'" + }, + { + "name": "path", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'str | None'" + } + ], + "return_annotation": "'str | None'" + } + }, + { + "name": "items", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": null + } + }, + { + "name": "keys", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": null + } + }, + { + "name": "pop", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "key", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "default", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "" + } + ], + "return_annotation": null + } + }, + { + "name": "popitem", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": null + } + }, + { + "name": "set", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "name", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "value", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "domain", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "''", + "annotation": "'str'" + }, + { + "name": "path", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "'/'", + "annotation": "'str'" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "set_cookie_header", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "setdefault", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "key", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "default", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None" + } + ], + "return_annotation": null + } + }, + { + "name": "update", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "cookies", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'CookieTypes | None'" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "values", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": null + } + } + ] + }, + { + "name": "DecodingError", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "RequestError" + ], + "mro": [ + "BaseException", + "DecodingError", + "Exception", + "HTTPError", + "RequestError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "DigestAuth", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "username", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str | bytes'" + }, + { + "name": "password", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str | bytes'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "Auth" + ], + "mro": [ + "Auth", + "DigestAuth" + ], + "methods": [ + { + "name": "async_auth_flow", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'typing.AsyncGenerator[Request, Response]'" + } + }, + { + "name": "auth_flow", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'typing.Generator[Request, Response, None]'" + } + }, + { + "name": "sync_auth_flow", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'typing.Generator[Request, Response, None]'" + } + } + ] + }, + { + "name": "HTTPError", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "Exception" + ], + "mro": [ + "BaseException", + "Exception", + "HTTPError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "HTTPStatusError", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "annotation": "'Request'" + }, + { + "name": "response", + "kind": "KEYWORD_ONLY", + "annotation": "'Response'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "HTTPError" + ], + "mro": [ + "BaseException", + "Exception", + "HTTPError", + "HTTPStatusError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "HTTPTransport", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "verify", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "True", + "annotation": "'ssl.SSLContext | str | bool'" + }, + { + "name": "cert", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'CertTypes | None'" + }, + { + "name": "trust_env", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "True", + "annotation": "'bool'" + }, + { + "name": "http1", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "True", + "annotation": "'bool'" + }, + { + "name": "http2", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "False", + "annotation": "'bool'" + }, + { + "name": "limits", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "Limits(max_connections=100, max_keepalive_connections=20, keepalive_expiry=5.0)", + "annotation": "'Limits'" + }, + { + "name": "proxy", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'ProxyTypes | None'" + }, + { + "name": "uds", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'str | None'" + }, + { + "name": "local_address", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'str | None'" + }, + { + "name": "retries", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "0", + "annotation": "'int'" + }, + { + "name": "socket_options", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'typing.Iterable[SOCKET_OPTION] | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "BaseTransport" + ], + "mro": [ + "BaseTransport", + "HTTPTransport" + ], + "methods": [ + { + "name": "close", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "handle_request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'Response'" + } + } + ] + }, + { + "name": "Headers", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "headers", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "encoding", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'str | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "Generic", + "MutableMapping" + ], + "mro": [ + "Collection", + "Container", + "Generic", + "Headers", + "Iterable", + "Mapping", + "MutableMapping", + "Sized" + ], + "methods": [ + { + "name": "clear", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": null + } + }, + { + "name": "copy", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Headers'" + } + }, + { + "name": "get", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "key", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "default", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'typing.Any'" + } + ], + "return_annotation": "'typing.Any'" + } + }, + { + "name": "get_list", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "key", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "split_commas", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "False", + "annotation": "'bool'" + } + ], + "return_annotation": "'list[str]'" + } + }, + { + "name": "items", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'typing.ItemsView[str, str]'" + } + }, + { + "name": "keys", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'typing.KeysView[str]'" + } + }, + { + "name": "multi_items", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'list[tuple[str, str]]'" + } + }, + { + "name": "pop", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "key", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "default", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "" + } + ], + "return_annotation": null + } + }, + { + "name": "popitem", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": null + } + }, + { + "name": "setdefault", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "key", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "default", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None" + } + ], + "return_annotation": null + } + }, + { + "name": "update", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "headers", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'HeaderTypes | None'" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "values", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'typing.ValuesView[str]'" + } + } + ], + "properties": [ + { + "name": "encoding", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'str'" + } + }, + { + "name": "raw", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'list[tuple[bytes, bytes]]'" + } + } + ] + }, + { + "name": "InvalidURL", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "Exception" + ], + "mro": [ + "BaseException", + "Exception", + "InvalidURL" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ] + }, + { + "name": "Limits", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "max_connections", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'int | None'" + }, + { + "name": "max_keepalive_connections", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'int | None'" + }, + { + "name": "keepalive_expiry", + "kind": "KEYWORD_ONLY", + "default": "5.0", + "annotation": "'float | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "object" + ], + "mro": [ + "Limits" + ] + }, + { + "name": "LocalProtocolError", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "ProtocolError" + ], + "mro": [ + "BaseException", + "Exception", + "HTTPError", + "LocalProtocolError", + "ProtocolError", + "RequestError", + "TransportError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "MockTransport", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "handler", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'SyncHandler | AsyncHandler'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "AsyncBaseTransport", + "BaseTransport" + ], + "mro": [ + "AsyncBaseTransport", + "BaseTransport", + "MockTransport" + ], + "methods": [ + { + "name": "aclose", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "close", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "handle_async_request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "handle_request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'Response'" + } + } + ] + }, + { + "name": "NetRCAuth", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "file", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'str | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "Auth" + ], + "mro": [ + "Auth", + "NetRCAuth" + ], + "methods": [ + { + "name": "async_auth_flow", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'typing.AsyncGenerator[Request, Response]'" + } + }, + { + "name": "auth_flow", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'typing.Generator[Request, Response, None]'" + } + }, + { + "name": "sync_auth_flow", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'typing.Generator[Request, Response, None]'" + } + } + ] + }, + { + "name": "NetworkError", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "TransportError" + ], + "mro": [ + "BaseException", + "Exception", + "HTTPError", + "NetworkError", + "RequestError", + "TransportError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "PoolTimeout", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "TimeoutException" + ], + "mro": [ + "BaseException", + "Exception", + "HTTPError", + "PoolTimeout", + "RequestError", + "TimeoutException", + "TransportError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "ProtocolError", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "TransportError" + ], + "mro": [ + "BaseException", + "Exception", + "HTTPError", + "ProtocolError", + "RequestError", + "TransportError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "Proxy", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "ssl_context", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'ssl.SSLContext | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'tuple[str, str] | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "object" + ], + "mro": [ + "Proxy" + ], + "properties": [ + { + "name": "raw_auth", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'tuple[bytes, bytes] | None'" + } + } + ] + }, + { + "name": "ProxyError", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "TransportError" + ], + "mro": [ + "BaseException", + "Exception", + "HTTPError", + "ProxyError", + "RequestError", + "TransportError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "QueryParams", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "args", + "kind": "VAR_POSITIONAL", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "annotation": "'typing.Any'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "Generic", + "Mapping" + ], + "mro": [ + "Collection", + "Container", + "Generic", + "Iterable", + "Mapping", + "QueryParams", + "Sized" + ], + "methods": [ + { + "name": "add", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "key", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "value", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'typing.Any'" + } + ], + "return_annotation": "'QueryParams'" + } + }, + { + "name": "get", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "key", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'typing.Any'" + }, + { + "name": "default", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'typing.Any'" + } + ], + "return_annotation": "'typing.Any'" + } + }, + { + "name": "get_list", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "key", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + } + ], + "return_annotation": "'list[str]'" + } + }, + { + "name": "items", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'typing.ItemsView[str, str]'" + } + }, + { + "name": "keys", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'typing.KeysView[str]'" + } + }, + { + "name": "merge", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "params", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'QueryParamTypes | None'" + } + ], + "return_annotation": "'QueryParams'" + } + }, + { + "name": "multi_items", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'list[tuple[str, str]]'" + } + }, + { + "name": "remove", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "key", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + } + ], + "return_annotation": "'QueryParams'" + } + }, + { + "name": "set", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "key", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "value", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'typing.Any'" + } + ], + "return_annotation": "'QueryParams'" + } + }, + { + "name": "update", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "params", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'QueryParamTypes | None'" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "values", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'typing.ValuesView[str]'" + } + } + ] + }, + { + "name": "ReadError", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "NetworkError" + ], + "mro": [ + "BaseException", + "Exception", + "HTTPError", + "NetworkError", + "ReadError", + "RequestError", + "TransportError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "ReadTimeout", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "TimeoutException" + ], + "mro": [ + "BaseException", + "Exception", + "HTTPError", + "ReadTimeout", + "RequestError", + "TimeoutException", + "TransportError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "RemoteProtocolError", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "ProtocolError" + ], + "mro": [ + "BaseException", + "Exception", + "HTTPError", + "ProtocolError", + "RemoteProtocolError", + "RequestError", + "TransportError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "Request", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "method", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestContent | None'" + }, + { + "name": "data", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestData | None'" + }, + { + "name": "files", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestFiles | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any | None'" + }, + { + "name": "stream", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'SyncByteStream | AsyncByteStream | None'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestExtensions | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "object" + ], + "mro": [ + "Request" + ], + "methods": [ + { + "name": "aread", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bytes'" + } + }, + { + "name": "read", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bytes'" + } + } + ], + "properties": [ + { + "name": "content", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bytes'" + } + } + ] + }, + { + "name": "RequestError", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "HTTPError" + ], + "mro": [ + "BaseException", + "Exception", + "HTTPError", + "RequestError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "RequestNotRead", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "StreamError" + ], + "mro": [ + "BaseException", + "Exception", + "RequestNotRead", + "RuntimeError", + "StreamError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ] + }, + { + "name": "Response", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "status_code", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'int'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'ResponseContent | None'" + }, + { + "name": "text", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'str | None'" + }, + { + "name": "html", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'str | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any'" + }, + { + "name": "stream", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'SyncByteStream | AsyncByteStream | None'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + }, + { + "name": "extensions", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'ResponseExtensions | None'" + }, + { + "name": "history", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'list[Response] | None'" + }, + { + "name": "default_encoding", + "kind": "KEYWORD_ONLY", + "default": "'utf-8'", + "annotation": "'str | typing.Callable[[bytes], str]'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "object" + ], + "mro": [ + "Response" + ], + "methods": [ + { + "name": "aclose", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "aiter_bytes", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "chunk_size", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'int | None'" + } + ], + "return_annotation": "'typing.AsyncIterator[bytes]'" + } + }, + { + "name": "aiter_lines", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'typing.AsyncIterator[str]'" + } + }, + { + "name": "aiter_raw", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "chunk_size", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'int | None'" + } + ], + "return_annotation": "'typing.AsyncIterator[bytes]'" + } + }, + { + "name": "aiter_text", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "chunk_size", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'int | None'" + } + ], + "return_annotation": "'typing.AsyncIterator[str]'" + } + }, + { + "name": "aread", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bytes'" + } + }, + { + "name": "close", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "iter_bytes", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "chunk_size", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'int | None'" + } + ], + "return_annotation": "'typing.Iterator[bytes]'" + } + }, + { + "name": "iter_lines", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'typing.Iterator[str]'" + } + }, + { + "name": "iter_raw", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "chunk_size", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'int | None'" + } + ], + "return_annotation": "'typing.Iterator[bytes]'" + } + }, + { + "name": "iter_text", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "chunk_size", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'int | None'" + } + ], + "return_annotation": "'typing.Iterator[str]'" + } + }, + { + "name": "json", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "annotation": "'typing.Any'" + } + ], + "return_annotation": "'typing.Any'" + } + }, + { + "name": "raise_for_status", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Response'" + } + }, + { + "name": "read", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bytes'" + } + } + ], + "properties": [ + { + "name": "charset_encoding", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'str | None'" + } + }, + { + "name": "content", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bytes'" + } + }, + { + "name": "cookies", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Cookies'" + } + }, + { + "name": "elapsed", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'datetime.timedelta'" + } + }, + { + "name": "encoding", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'str | None'" + } + }, + { + "name": "has_redirect_location", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bool'" + } + }, + { + "name": "http_version", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'str'" + } + }, + { + "name": "is_client_error", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bool'" + } + }, + { + "name": "is_error", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bool'" + } + }, + { + "name": "is_informational", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bool'" + } + }, + { + "name": "is_redirect", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bool'" + } + }, + { + "name": "is_server_error", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bool'" + } + }, + { + "name": "is_success", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bool'" + } + }, + { + "name": "links", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'dict[str | None, dict[str, str]]'" + } + }, + { + "name": "num_bytes_downloaded", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'int'" + } + }, + { + "name": "reason_phrase", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'str'" + } + }, + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + }, + { + "name": "text", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'str'" + } + }, + { + "name": "url", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'URL'" + } + } + ] + }, + { + "name": "ResponseNotRead", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "StreamError" + ], + "mro": [ + "BaseException", + "Exception", + "ResponseNotRead", + "RuntimeError", + "StreamError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ] + }, + { + "name": "StreamClosed", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "StreamError" + ], + "mro": [ + "BaseException", + "Exception", + "RuntimeError", + "StreamClosed", + "StreamError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ] + }, + { + "name": "StreamConsumed", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "StreamError" + ], + "mro": [ + "BaseException", + "Exception", + "RuntimeError", + "StreamConsumed", + "StreamError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ] + }, + { + "name": "StreamError", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "RuntimeError" + ], + "mro": [ + "BaseException", + "Exception", + "RuntimeError", + "StreamError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ] + }, + { + "name": "SyncByteStream", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "args", + "kind": "VAR_POSITIONAL" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD" + } + ], + "return_annotation": null + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "object" + ], + "mro": [ + "SyncByteStream" + ], + "methods": [ + { + "name": "close", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "None" + } + } + ] + }, + { + "name": "Timeout", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "timeout", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "", + "annotation": "'TimeoutTypes | UnsetType'" + }, + { + "name": "connect", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'None | float | UnsetType'" + }, + { + "name": "read", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'None | float | UnsetType'" + }, + { + "name": "write", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'None | float | UnsetType'" + }, + { + "name": "pool", + "kind": "KEYWORD_ONLY", + "default": "", + "annotation": "'None | float | UnsetType'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "object" + ], + "mro": [ + "Timeout" + ], + "methods": [ + { + "name": "as_dict", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'dict[str, float | None]'" + } + } + ] + }, + { + "name": "TimeoutException", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "TransportError" + ], + "mro": [ + "BaseException", + "Exception", + "HTTPError", + "RequestError", + "TimeoutException", + "TransportError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "TooManyRedirects", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "RequestError" + ], + "mro": [ + "BaseException", + "Exception", + "HTTPError", + "RequestError", + "TooManyRedirects" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "TransportError", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "RequestError" + ], + "mro": [ + "BaseException", + "Exception", + "HTTPError", + "RequestError", + "TransportError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "URL", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "''", + "annotation": "'URL | str'" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "annotation": "'typing.Any'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "object" + ], + "mro": [ + "URL" + ], + "methods": [ + { + "name": "copy_add_param", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "key", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "value", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'typing.Any'" + } + ], + "return_annotation": "'URL'" + } + }, + { + "name": "copy_merge_params", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "params", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'QueryParamTypes'" + } + ], + "return_annotation": "'URL'" + } + }, + { + "name": "copy_remove_param", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "key", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + } + ], + "return_annotation": "'URL'" + } + }, + { + "name": "copy_set_param", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "key", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "value", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'typing.Any'" + } + ], + "return_annotation": "'URL'" + } + }, + { + "name": "copy_with", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "annotation": "'typing.Any'" + } + ], + "return_annotation": "'URL'" + } + }, + { + "name": "join", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + } + ], + "return_annotation": "'URL'" + } + } + ], + "properties": [ + { + "name": "fragment", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'str'" + } + }, + { + "name": "host", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'str'" + } + }, + { + "name": "is_absolute_url", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bool'" + } + }, + { + "name": "is_relative_url", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bool'" + } + }, + { + "name": "netloc", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bytes'" + } + }, + { + "name": "params", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'QueryParams'" + } + }, + { + "name": "password", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'str'" + } + }, + { + "name": "path", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'str'" + } + }, + { + "name": "port", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'int | None'" + } + }, + { + "name": "query", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bytes'" + } + }, + { + "name": "raw", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'tuple[bytes, bytes, int, bytes]'" + } + }, + { + "name": "raw_host", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bytes'" + } + }, + { + "name": "raw_path", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bytes'" + } + }, + { + "name": "raw_scheme", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bytes'" + } + }, + { + "name": "scheme", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'str'" + } + }, + { + "name": "userinfo", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'bytes'" + } + }, + { + "name": "username", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'str'" + } + } + ] + }, + { + "name": "USE_CLIENT_DEFAULT", + "kind": "constant", + "signature": null, + "module_of_origin": "httpx", + "deprecated": false + }, + { + "name": "UnsupportedProtocol", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "TransportError" + ], + "mro": [ + "BaseException", + "Exception", + "HTTPError", + "RequestError", + "TransportError", + "UnsupportedProtocol" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "WSGITransport", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "app", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'WSGIApplication'" + }, + { + "name": "raise_app_exceptions", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "True", + "annotation": "'bool'" + }, + { + "name": "script_name", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "''", + "annotation": "'str'" + }, + { + "name": "remote_addr", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "'127.0.0.1'", + "annotation": "'str'" + }, + { + "name": "wsgi_errors", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'typing.TextIO | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "BaseTransport" + ], + "mro": [ + "BaseTransport", + "WSGITransport" + ], + "methods": [ + { + "name": "close", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'None'" + } + }, + { + "name": "handle_request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "request", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'Request'" + } + ], + "return_annotation": "'Response'" + } + } + ] + }, + { + "name": "WriteError", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "NetworkError" + ], + "mro": [ + "BaseException", + "Exception", + "HTTPError", + "NetworkError", + "RequestError", + "TransportError", + "WriteError" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "WriteTimeout", + "kind": "exception", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "message", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "request", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'Request | None'" + } + ], + "return_annotation": "'None'" + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "TimeoutException" + ], + "mro": [ + "BaseException", + "Exception", + "HTTPError", + "RequestError", + "TimeoutException", + "TransportError", + "WriteTimeout" + ], + "methods": [ + { + "name": "add_note", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "note", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "with_traceback", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "tb", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + } + ], + "properties": [ + { + "name": "request", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_OR_KEYWORD" + } + ], + "return_annotation": "'Request'" + } + } + ] + }, + { + "name": "__description__", + "kind": "constant", + "signature": null, + "module_of_origin": "httpx", + "deprecated": false + }, + { + "name": "__title__", + "kind": "constant", + "signature": null, + "module_of_origin": "httpx", + "deprecated": false + }, + { + "name": "__version__", + "kind": "constant", + "signature": null, + "module_of_origin": "httpx", + "deprecated": false + }, + { + "name": "codes", + "kind": "class", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "args", + "kind": "VAR_POSITIONAL" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD" + } + ], + "return_annotation": null + }, + "module_of_origin": "httpx", + "deprecated": false, + "bases": [ + "IntEnum" + ], + "mro": [ + "Enum", + "IntEnum", + "ReprEnum", + "codes", + "int" + ], + "methods": [ + { + "name": "as_integer_ratio", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "bit_count", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "bit_length", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "conjugate", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "from_bytes", + "signature": { + "parameters": [ + { + "name": "bytes", + "kind": "POSITIONAL_OR_KEYWORD" + }, + { + "name": "byteorder", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "'big'" + }, + { + "name": "signed", + "kind": "KEYWORD_ONLY", + "default": "False" + } + ], + "return_annotation": null + } + }, + { + "name": "is_integer", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + } + ], + "return_annotation": null + } + }, + { + "name": "to_bytes", + "signature": { + "parameters": [ + { + "name": "self", + "kind": "POSITIONAL_ONLY" + }, + { + "name": "length", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "1" + }, + { + "name": "byteorder", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "'big'" + }, + { + "name": "signed", + "kind": "KEYWORD_ONLY", + "default": "False" + } + ], + "return_annotation": null + } + } + ] + }, + { + "name": "create_ssl_context", + "kind": "function", + "signature": { + "parameters": [ + { + "name": "verify", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "True", + "annotation": "'ssl.SSLContext | str | bool'" + }, + { + "name": "cert", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "None", + "annotation": "'CertTypes | None'" + }, + { + "name": "trust_env", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "True", + "annotation": "'bool'" + } + ], + "return_annotation": "'ssl.SSLContext'" + }, + "module_of_origin": "httpx", + "deprecated": false + }, + { + "name": "delete", + "kind": "function", + "signature": { + "parameters": [ + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'AuthTypes | None'" + }, + { + "name": "proxy", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'ProxyTypes | None'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "False", + "annotation": "'bool'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "Timeout(timeout=5.0)", + "annotation": "'TimeoutTypes'" + }, + { + "name": "verify", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'ssl.SSLContext | str | bool'" + }, + { + "name": "trust_env", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'bool'" + } + ], + "return_annotation": "'Response'" + }, + "module_of_origin": "httpx", + "deprecated": false + }, + { + "name": "get", + "kind": "function", + "signature": { + "parameters": [ + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'AuthTypes | None'" + }, + { + "name": "proxy", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'ProxyTypes | None'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "False", + "annotation": "'bool'" + }, + { + "name": "verify", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'ssl.SSLContext | str | bool'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "Timeout(timeout=5.0)", + "annotation": "'TimeoutTypes'" + }, + { + "name": "trust_env", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'bool'" + } + ], + "return_annotation": "'Response'" + }, + "module_of_origin": "httpx", + "deprecated": false + }, + { + "name": "head", + "kind": "function", + "signature": { + "parameters": [ + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'AuthTypes | None'" + }, + { + "name": "proxy", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'ProxyTypes | None'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "False", + "annotation": "'bool'" + }, + { + "name": "verify", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'ssl.SSLContext | str | bool'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "Timeout(timeout=5.0)", + "annotation": "'TimeoutTypes'" + }, + { + "name": "trust_env", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'bool'" + } + ], + "return_annotation": "'Response'" + }, + "module_of_origin": "httpx", + "deprecated": false + }, + { + "name": "main", + "kind": "function", + "signature": { + "parameters": [], + "return_annotation": "None" + }, + "module_of_origin": "httpx", + "deprecated": false + }, + { + "name": "options", + "kind": "function", + "signature": { + "parameters": [ + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'AuthTypes | None'" + }, + { + "name": "proxy", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'ProxyTypes | None'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "False", + "annotation": "'bool'" + }, + { + "name": "verify", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'ssl.SSLContext | str | bool'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "Timeout(timeout=5.0)", + "annotation": "'TimeoutTypes'" + }, + { + "name": "trust_env", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'bool'" + } + ], + "return_annotation": "'Response'" + }, + "module_of_origin": "httpx", + "deprecated": false + }, + { + "name": "patch", + "kind": "function", + "signature": { + "parameters": [ + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestContent | None'" + }, + { + "name": "data", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestData | None'" + }, + { + "name": "files", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestFiles | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any | None'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'AuthTypes | None'" + }, + { + "name": "proxy", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'ProxyTypes | None'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "False", + "annotation": "'bool'" + }, + { + "name": "verify", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'ssl.SSLContext | str | bool'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "Timeout(timeout=5.0)", + "annotation": "'TimeoutTypes'" + }, + { + "name": "trust_env", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'bool'" + } + ], + "return_annotation": "'Response'" + }, + "module_of_origin": "httpx", + "deprecated": false + }, + { + "name": "post", + "kind": "function", + "signature": { + "parameters": [ + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestContent | None'" + }, + { + "name": "data", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestData | None'" + }, + { + "name": "files", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestFiles | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any | None'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'AuthTypes | None'" + }, + { + "name": "proxy", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'ProxyTypes | None'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "False", + "annotation": "'bool'" + }, + { + "name": "verify", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'ssl.SSLContext | str | bool'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "Timeout(timeout=5.0)", + "annotation": "'TimeoutTypes'" + }, + { + "name": "trust_env", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'bool'" + } + ], + "return_annotation": "'Response'" + }, + "module_of_origin": "httpx", + "deprecated": false + }, + { + "name": "put", + "kind": "function", + "signature": { + "parameters": [ + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestContent | None'" + }, + { + "name": "data", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestData | None'" + }, + { + "name": "files", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestFiles | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any | None'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'AuthTypes | None'" + }, + { + "name": "proxy", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'ProxyTypes | None'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "False", + "annotation": "'bool'" + }, + { + "name": "verify", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'ssl.SSLContext | str | bool'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "Timeout(timeout=5.0)", + "annotation": "'TimeoutTypes'" + }, + { + "name": "trust_env", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'bool'" + } + ], + "return_annotation": "'Response'" + }, + "module_of_origin": "httpx", + "deprecated": false + }, + { + "name": "request", + "kind": "function", + "signature": { + "parameters": [ + { + "name": "method", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestContent | None'" + }, + { + "name": "data", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestData | None'" + }, + { + "name": "files", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestFiles | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'AuthTypes | None'" + }, + { + "name": "proxy", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'ProxyTypes | None'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "Timeout(timeout=5.0)", + "annotation": "'TimeoutTypes'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "False", + "annotation": "'bool'" + }, + { + "name": "verify", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'ssl.SSLContext | str | bool'" + }, + { + "name": "trust_env", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'bool'" + } + ], + "return_annotation": "'Response'" + }, + "module_of_origin": "httpx", + "deprecated": false + }, + { + "name": "stream", + "kind": "function", + "signature": { + "parameters": [ + { + "name": "method", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'str'" + }, + { + "name": "url", + "kind": "POSITIONAL_OR_KEYWORD", + "annotation": "'URL | str'" + }, + { + "name": "params", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'QueryParamTypes | None'" + }, + { + "name": "content", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestContent | None'" + }, + { + "name": "data", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestData | None'" + }, + { + "name": "files", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'RequestFiles | None'" + }, + { + "name": "json", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'typing.Any | None'" + }, + { + "name": "headers", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'HeaderTypes | None'" + }, + { + "name": "cookies", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'CookieTypes | None'" + }, + { + "name": "auth", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'AuthTypes | None'" + }, + { + "name": "proxy", + "kind": "KEYWORD_ONLY", + "default": "None", + "annotation": "'ProxyTypes | None'" + }, + { + "name": "timeout", + "kind": "KEYWORD_ONLY", + "default": "Timeout(timeout=5.0)", + "annotation": "'TimeoutTypes'" + }, + { + "name": "follow_redirects", + "kind": "KEYWORD_ONLY", + "default": "False", + "annotation": "'bool'" + }, + { + "name": "verify", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'ssl.SSLContext | str | bool'" + }, + { + "name": "trust_env", + "kind": "KEYWORD_ONLY", + "default": "True", + "annotation": "'bool'" + } + ], + "return_annotation": "'typing.Iterator[Response]'" + }, + "module_of_origin": "httpx", + "deprecated": false + } + ] +} diff --git a/compat/httpx/0.28.1/requirements.txt b/compat/httpx/0.28.1/requirements.txt new file mode 100644 index 00000000..bbf62d34 --- /dev/null +++ b/compat/httpx/0.28.1/requirements.txt @@ -0,0 +1,5 @@ +httpx==0.28.1 +requests>=2.31.0,<3.0.0 +pytest>=7.0.0 +pytest-asyncio>=0.21.0 +pytest-timeout>=2.0.0 diff --git a/crates/eggfetch-python/tests/compat/__init__.py b/crates/eggfetch-python/tests/compat/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/crates/eggfetch-python/tests/compat/conftest.py b/crates/eggfetch-python/tests/compat/conftest.py new file mode 100644 index 00000000..7740a7fd --- /dev/null +++ b/crates/eggfetch-python/tests/compat/conftest.py @@ -0,0 +1,84 @@ +"""Configuration for HTTPX compatibility tests. + +This conftest enforces fail-closed behavior: if httpx or requests is not +installed, or the wrong version is installed, the entire test session fails +rather than silently skipping. +""" + +import os + +import pytest + +REQUIRED_HTTPX_VERSION = "0.28.1" + +# Module-level state for skip auditing +_skipped: list[str] = [] +_xfailed: list[str] = [] +_collection_errors: list[str] = [] +_profile = os.environ.get("EGGFETCH_COMPAT_PROFILE", "httpx/0.28.1") + + +def pytest_configure(config): + """Register compatibility markers.""" + config.addinivalue_line("markers", "compat: HTTPX compatibility tests (required)") + + +def pytest_runtest_logreport(report): + """Record skips, xfails, and collection errors for audit.""" + if report.when == "call": + if report.skipped: + _skipped.append(report.nodeid) + if getattr(report, "wasxfail", False): + _xfailed.append(report.nodeid) + if report.when == "collect": + if report.skipped: + _collection_errors.append(report.nodeid) + + +@pytest.hookimpl(trylast=True) +def pytest_terminal_summary(terminalreporter, exitstatus, config): + """Print skip audit summary and fail on unexplained skips in required mode.""" + is_required = os.environ.get("EGGFETCH_COMPAT_REQUIRED", "0") == "1" + + terminalreporter.section("Skip Audit") + + if _skipped: + terminalreporter.write_line( + f"Skipped tests ({len(_skipped)}):", yellow=True + ) + for nodeid in _skipped: + terminalreporter.write_line(f" - {nodeid}", yellow=True) + + if _xfailed: + terminalreporter.write_line( + f"XFailed tests ({len(_xfailed)}):", yellow=True + ) + for nodeid in _xfailed: + terminalreporter.write_line(f" - {nodeid}", yellow=True) + + if _collection_errors: + terminalreporter.write_line( + f"Collection errors ({len(_collection_errors)}):", red=True + ) + for nodeid in _collection_errors: + terminalreporter.write_line(f" - {nodeid}", red=True) + + terminalreporter.write_line(f"Profile: {_profile}") + + if is_required: + all_issues = _skipped + _xfailed + _collection_errors + if all_issues: + terminalreporter.write_line( + f"\nFAIL: Required compatibility profile has " + f"{len(all_issues)} unapproved skip/xfail/collection issue(s)", + red=True, + ) + config._compat_exit_code = 1 + + +@pytest.hookimpl(trylast=True) +def pytest_sessionfinish(session, exitstatus): + """Override exit code if required profile found issues.""" + is_required = os.environ.get("EGGFETCH_COMPAT_REQUIRED", "0") == "1" + if is_required and hasattr(session.config, "_compat_exit_code"): + session.exitstatus = session.config._compat_exit_code diff --git a/crates/eggfetch-python/tests/compat/fixtures.py b/crates/eggfetch-python/tests/compat/fixtures.py new file mode 100644 index 00000000..70b28dc6 --- /dev/null +++ b/crates/eggfetch-python/tests/compat/fixtures.py @@ -0,0 +1,282 @@ +"""Deterministic behavior fixtures for HTTPX compatibility testing. + +Provides reusable test server endpoints and structured test cases +with stable IDs for systematic compatibility verification. +""" + +import base64 +import gzip +import http.server +import json +import threading +import urllib.parse +from dataclasses import dataclass, field +from typing import Any + + +@dataclass +class BehaviorCase: + """A structured test case for compatibility verification.""" + case_id: str + description: str + method: str + path: str + expected_status: int + expected_fields: dict[str, Any] = field(default_factory=dict) + headers: dict[str, str] = field(default_factory=dict) + body: bytes | None = None + content_type: str | None = None + follow_redirects: bool = True + timeout: float | None = None + + +class CompatTestHandler(http.server.BaseHTTPRequestHandler): + """Deterministic test server for behavior fixtures.""" + + def _send_json(self, data, status=200): + body = json.dumps(data).encode() + self.send_response(status) + self.send_header("Content-Type", "application/json") + self.send_header("Content-Length", str(len(body))) + self.end_headers() + self.wfile.write(body) + + def _send_text(self, text, status=200): + body = text.encode() + self.send_response(status) + self.send_header("Content-Type", "text/plain") + self.send_header("Content-Length", str(len(body))) + self.end_headers() + self.wfile.write(body) + + def _send_gzip(self, text, status=200): + body = gzip.compress(text.encode()) + self.send_response(status) + self.send_header("Content-Type", "text/plain") + self.send_header("Content-Encoding", "gzip") + self.send_header("Content-Length", str(len(body))) + self.end_headers() + self.wfile.write(body) + + def do_GET(self): + parsed = urllib.parse.urlparse(self.path) + path = parsed.path + qs = urllib.parse.parse_qs(parsed.query) + port = self.server.server_address[1] + base = f"http://127.0.0.1:{port}" + + if path == "/get": + self._send_json({"method": "GET", "path": path}) + elif path == "/json": + self._send_json({"key": "value", "number": 42}) + elif path == "/headers": + headers = {k: v for k, v in self.headers.items()} + self._send_json({"headers": headers}) + elif path == "/redirect/301": + self.send_response(301) + self.send_header("Location", f"{base}/get") + self.end_headers() + elif path == "/redirect/302": + self.send_response(302) + self.send_header("Location", f"{base}/get") + self.end_headers() + elif path == "/redirect/307": + self.send_response(307) + self.send_header("Location", f"{base}/get") + self.end_headers() + elif path == "/redirect/308": + self.send_response(308) + self.send_header("Location", f"{base}/get") + self.end_headers() + elif path == "/redirect/chain": + depth = int(qs.get("depth", ["1"])[0]) + if depth > 0: + self.send_response(302) + self.send_header("Location", f"{base}/redirect/chain?depth={depth - 1}") + self.end_headers() + else: + self._send_json({"method": "GET", "path": path}) + elif path == "/basic-auth": + auth_header = self.headers.get("Authorization", "") + if auth_header.startswith("Basic "): + decoded = base64.b64decode(auth_header[6:]).decode() + user, password = decoded.split(":", 1) + self._send_json({"authenticated": True, "user": user, "password": password}) + else: + self.send_response(401) + self.send_header("WWW-Authenticate", 'Basic realm="test"') + self.end_headers() + elif path == "/bearer-auth": + auth_header = self.headers.get("Authorization", "") + if auth_header.startswith("Bearer "): + token = auth_header[7:] + self._send_json({"authenticated": True, "token": token}) + else: + self.send_response(401) + self.end_headers() + elif path == "/gzip": + text = qs.get("text", ["hello gzip"])[0] + self._send_gzip(text) + elif path == "/stream": + count = int(qs.get("count", ["5"])[0]) + lines = [f"line-{i}" for i in range(count)] + text = "\n".join(lines) + "\n" + self._send_text(text) + elif path == "/set-cookie": + value = qs.get("value", ["test-cookie"])[0] + self.send_response(200) + self.send_header("Content-Type", "application/json") + self.send_header("Set-Cookie", f"session={value}; Path=/; HttpOnly") + body = json.dumps({"cookie_set": True}).encode() + self.send_header("Content-Length", str(len(body))) + self.end_headers() + self.wfile.write(body) + elif path == "/echo-cookies": + cookie_header = self.headers.get("Cookie", "") + self._send_json({"cookie_header": cookie_header}) + elif path == "/delay": + import time + seconds = float(qs.get("seconds", ["0.1"])[0]) + time.sleep(seconds) + self._send_text("done") + elif path == "/status/200": + self._send_text("ok") + elif path == "/status/301": + self.send_response(301) + self.send_header("Location", f"{base}/get") + self.end_headers() + elif path == "/status/404": + self._send_text("not found", 404) + elif path == "/status/500": + self._send_text("server error", 500) + elif path == "/status/503": + self._send_text("service unavailable", 503) + else: + self.send_response(404) + self.end_headers() + + def do_POST(self): + parsed = urllib.parse.urlparse(self.path) + path = parsed.path + if path == "/json": + content_length = int(self.headers.get("Content-Length", 0)) + body = self.rfile.read(content_length) + data = json.loads(body) + self._send_json({"received": data}) + elif path == "/echo": + content_length = int(self.headers.get("Content-Length", 0)) + body = self.rfile.read(content_length) + self.send_response(200) + self.send_header( + "Content-Type", + self.headers.get("Content-Type", "application/octet-stream"), + ) + self.send_header("Content-Length", str(len(body))) + self.end_headers() + self.wfile.write(body) + elif path == "/form": + content_length = int(self.headers.get("Content-Length", 0)) + body = self.rfile.read(content_length) + data = urllib.parse.parse_qs(body.decode()) + self._send_json( + { + "received": { + k: v[0] if len(v) == 1 else v + for k, v in data.items() + } + } + ) + else: + self.send_response(404) + self.end_headers() + + def log_message(self, format, *args): + pass + + +def create_server(): + """Create and start a test server, returning the base URL.""" + server = http.server.HTTPServer(("127.0.0.1", 0), CompatTestHandler) + port = server.server_address[1] + thread = threading.Thread(target=server.serve_forever, daemon=True) + thread.start() + return server, f"http://127.0.0.1:{port}" + + +# Pre-defined behavior cases +BEHAVIOR_CASES = [ + BehaviorCase( + case_id="GET-001", + description="Simple GET returns JSON", + method="GET", + path="/get", + expected_status=200, + expected_fields={"method": "GET"}, + ), + BehaviorCase( + case_id="REDIRECT-001", + description="302 redirect not followed by default", + method="GET", + path="/redirect/302", + expected_status=302, + follow_redirects=False, + ), + BehaviorCase( + case_id="REDIRECT-002", + description="302 redirect followed with flag", + method="GET", + path="/redirect/302", + expected_status=200, + follow_redirects=True, + ), + BehaviorCase( + case_id="BASIC-AUTH-001", + description="Basic auth sends credentials", + method="GET", + path="/basic-auth", + expected_status=200, + headers={"Authorization": "Basic dXNlcjpwYXNz"}, + expected_fields={"authenticated": True, "user": "user"}, + ), + BehaviorCase( + case_id="BEARER-AUTH-001", + description="Bearer auth sends token", + method="GET", + path="/bearer-auth", + expected_status=200, + headers={"Authorization": "Bearer test-token-123"}, + expected_fields={"authenticated": True, "token": "test-token-123"}, + ), + BehaviorCase( + case_id="JSON-001", + description="GET /json returns expected payload", + method="GET", + path="/json", + expected_status=200, + expected_fields={"key": "value", "number": 42}, + ), + BehaviorCase( + case_id="JSON-POST-001", + description="POST JSON echoes received data", + method="POST", + path="/json", + expected_status=200, + body=json.dumps({"data": "test"}).encode(), + content_type="application/json", + expected_fields={"received": {"data": "test"}}, + ), + BehaviorCase( + case_id="STATUS-404-001", + description="404 status code", + method="GET", + path="/status/404", + expected_status=404, + ), + BehaviorCase( + case_id="STATUS-500-001", + description="500 status code", + method="GET", + path="/status/500", + expected_status=500, + ), +] diff --git a/crates/eggfetch-python/tests/compat/test_behavior_cases.py b/crates/eggfetch-python/tests/compat/test_behavior_cases.py new file mode 100644 index 00000000..a571ce7a --- /dev/null +++ b/crates/eggfetch-python/tests/compat/test_behavior_cases.py @@ -0,0 +1,103 @@ +"""Structured behavior case tests for HTTPX compatibility. + +Each case has a stable ID and runs against both httpx and eggfetch +to verify identical behavior. +""" + +import json + +import httpx +import pytest + +import eggfetch + +from .fixtures import BEHAVIOR_CASES, BehaviorCase, create_server + +assert httpx.__version__ == "0.28.1" + + +@pytest.fixture(scope="module") +def server(): + srv, url = create_server() + yield url + srv.shutdown() + + +def _run_case_httpx(case: BehaviorCase, base_url: str): + """Run a behavior case against httpx.""" + url = f"{base_url}{case.path}" + kwargs = {"follow_redirects": case.follow_redirects} + if case.headers: + kwargs["headers"] = case.headers + if case.timeout: + kwargs["timeout"] = case.timeout + if case.body: + kwargs["content"] = case.body + if case.content_type: + kwargs["headers"] = {**(case.headers or {}), "Content-Type": case.content_type} + + if case.method == "GET": + return httpx.get(url, **kwargs) + elif case.method == "POST": + return httpx.post(url, **kwargs) + else: + return httpx.request(case.method, url, **kwargs) + + +def _run_case_eggfetch(case: BehaviorCase, base_url: str): + """Run a behavior case against eggfetch.""" + url = f"{base_url}{case.path}" + kwargs = {"follow_redirects": case.follow_redirects} + if case.headers: + kwargs["headers"] = case.headers + if case.timeout: + kwargs["timeout"] = case.timeout + if case.body: + kwargs["content"] = case.body + if case.content_type: + kwargs["headers"] = {**(case.headers or {}), "Content-Type": case.content_type} + + if case.method == "GET": + return eggfetch.get(url, **kwargs) + elif case.method == "POST": + return eggfetch.post(url, **kwargs) + else: + return eggfetch.request(case.method, url, **kwargs) + + +@pytest.mark.parametrize( + "case", + BEHAVIOR_CASES, + ids=[c.case_id for c in BEHAVIOR_CASES], +) +def test_eggfetch_matches_httpx_status(server, case: BehaviorCase): + """Eggfetch status code should match httpx for each behavior case.""" + httpx_resp = _run_case_httpx(case, server) + egg_resp = _run_case_eggfetch(case, server) + assert egg_resp.status_code == httpx_resp.status_code, ( + f"Case {case.case_id}: eggfetch={egg_resp.status_code} httpx={httpx_resp.status_code}" + ) + + +@pytest.mark.parametrize( + "case", + BEHAVIOR_CASES, + ids=[c.case_id for c in BEHAVIOR_CASES], +) +def test_eggfetch_matches_httpx_body(server, case: BehaviorCase): + """Eggfetch response body should match httpx for JSON cases.""" + httpx_resp = _run_case_httpx(case, server) + egg_resp = _run_case_eggfetch(case, server) + if "application/json" in httpx_resp.headers.get("content-type", ""): + assert httpx_resp.json() == egg_resp.json(), ( + f"Case {case.case_id}: body mismatch" + ) + + +def test_all_cases_have_required_fields(): + """Every behavior case must have a stable ID and expected status.""" + for case in BEHAVIOR_CASES: + assert case.case_id, f"Case missing case_id: {case}" + assert isinstance(case.expected_status, int), ( + f"Case {case.case_id}: expected_status must be int" + ) diff --git a/crates/eggfetch-python/tests/compat/test_httpx_extras.py b/crates/eggfetch-python/tests/compat/test_httpx_extras.py new file mode 100644 index 00000000..18971be7 --- /dev/null +++ b/crates/eggfetch-python/tests/compat/test_httpx_extras.py @@ -0,0 +1,31 @@ +"""Optional HTTPX extra compatibility tests. + +These tests exercise optional HTTPX features (HTTP/2, brotli, etc.) and +may skip if the corresponding extras are not installed. +""" + +import pytest + +import eggfetch + + +class TestHTTP2: + """HTTP/2 compatibility tests.""" + + def test_http2_flag_accepted(self): + """http2=True parameter should be accepted.""" + client = eggfetch.Client() + assert hasattr(client, "get") + + +class TestRetryCompat: + """Retry compatibility (eggfetch-only feature).""" + + def test_retry_object_creation(self): + retry = eggfetch.Retry(max_attempts=3) + assert retry.max_attempts == 3 + + def test_retry_default_statuses(self): + retry = eggfetch.Retry() + expected = {408, 429, 502, 503, 504} + assert set(retry.statuses) == expected diff --git a/crates/eggfetch-python/tests/compat/test_httpx_required.py b/crates/eggfetch-python/tests/compat/test_httpx_required.py new file mode 100644 index 00000000..a39170dd --- /dev/null +++ b/crates/eggfetch-python/tests/compat/test_httpx_required.py @@ -0,0 +1,264 @@ +"""Required HTTPX compatibility tests. + +These tests MUST pass against httpx==0.28.1. They cannot be skipped. +If httpx is not installed or the wrong version is present, the test +session will fail rather than skip. +""" + +import base64 +import http.server +import json +import threading +import urllib.parse + +import httpx +import pytest + +import eggfetch + +assert httpx.__version__ == "0.28.1", ( + f"Expected httpx 0.28.1, got {httpx.__version__}" +) + + +class _CompatHandler(http.server.BaseHTTPRequestHandler): + """Minimal test server for required compatibility tests.""" + + def _send_json(self, data, status=200): + body = json.dumps(data).encode() + self.send_response(status) + self.send_header("Content-Type", "application/json") + self.send_header("Content-Length", str(len(body))) + self.end_headers() + self.wfile.write(body) + + def _send_text(self, text, status=200): + body = text.encode() + self.send_response(status) + self.send_header("Content-Type", "text/plain") + self.send_header("Content-Length", str(len(body))) + self.end_headers() + self.wfile.write(body) + + def do_GET(self): + parsed = urllib.parse.urlparse(self.path) + path = parsed.path + port = self.server.server_address[1] + base = f"http://127.0.0.1:{port}" + + if path == "/get": + self._send_json({"method": "GET"}) + elif path == "/json": + self._send_json({"key": "value", "number": 42}) + elif path == "/headers": + headers = {k: v for k, v in self.headers.items()} + self._send_json({"headers": headers}) + elif path == "/redirect/302": + self.send_response(302) + self.send_header("Location", f"{base}/get") + self.end_headers() + elif path == "/basic-auth": + auth_header = self.headers.get("Authorization", "") + if auth_header.startswith("Basic "): + decoded = base64.b64decode(auth_header[6:]).decode() + user, _password = decoded.split(":", 1) + self._send_json({"authenticated": True, "user": user}) + else: + self.send_response(401) + self.send_header("WWW-Authenticate", 'Basic realm="test"') + self.end_headers() + elif path == "/status/404": + self._send_text("not found", 404) + elif path == "/status/500": + self._send_text("server error", 500) + else: + self.send_response(404) + self.end_headers() + + def do_POST(self): + parsed = urllib.parse.urlparse(self.path) + path = parsed.path + if path == "/json": + content_length = int(self.headers.get("Content-Length", 0)) + body = self.rfile.read(content_length) + data = json.loads(body) + self._send_json({"received": data}) + else: + self.send_response(404) + self.end_headers() + + def log_message(self, format, *args): + pass + + +@pytest.fixture(scope="module") +def compat_server(): + """Start a test server for required compatibility tests.""" + server = http.server.HTTPServer(("127.0.0.1", 0), _CompatHandler) + port = server.server_address[1] + thread = threading.Thread(target=server.serve_forever, daemon=True) + thread.start() + yield f"http://127.0.0.1:{port}" + server.shutdown() + + +class TestBasicClientShape: + """Verify eggfetch Client has the same constructor shape as httpx.Client.""" + + def test_client_context_manager(self, compat_server): + with eggfetch.Client() as client: + resp = client.get(f"{compat_server}/get") + assert resp.status_code == 200 + + def test_async_client_context_manager(self, compat_server): + import asyncio + + async def _test(): + async with eggfetch.AsyncClient() as client: + resp = await client.get(f"{compat_server}/get") + assert resp.status_code == 200 + + asyncio.run(_test()) + + def test_client_has_expected_methods(self): + client = eggfetch.Client() + for method in ( + "get", "post", "put", "patch", "delete", "head", + "options", "request", "stream", + ): + assert hasattr(client, method), f"Client missing method: {method}" + + def test_async_client_has_expected_methods(self): + client = eggfetch.AsyncClient() + for method in ( + "get", "post", "put", "patch", "delete", "head", + "options", "request", "stream", + ): + assert hasattr(client, method), f"AsyncClient missing method: {method}" + + +class TestRequestMethods: + """Verify HTTP methods work identically to httpx.""" + + @pytest.mark.parametrize( + "method", ["get", "post", "put", "patch", "delete", "head", "options"] + ) + def test_method_exists(self, method): + assert callable(getattr(eggfetch, method)) + + def test_get_returns_response(self, compat_server): + resp = eggfetch.get(f"{compat_server}/get") + assert resp.status_code == 200 + + def test_json_response(self, compat_server): + resp = eggfetch.get(f"{compat_server}/json") + assert resp.json() == {"key": "value", "number": 42} + + def test_post_json(self, compat_server): + resp = eggfetch.post(f"{compat_server}/json", json={"data": "test"}) + assert resp.status_code == 200 + assert resp.json()["received"]["data"] == "test" + + +class TestRedirectBehavior: + """Verify redirect behavior matches httpx (intentional difference documented).""" + + def test_no_follow_by_default(self, compat_server): + resp = eggfetch.get(f"{compat_server}/redirect/302") + assert resp.status_code == 302 + + def test_follow_with_flag(self, compat_server): + resp = eggfetch.get( + f"{compat_server}/redirect/302", follow_redirects=True + ) + assert resp.status_code == 200 + + +class TestErrorHandling: + """Verify error handling matches httpx exception hierarchy.""" + + def test_4xx_raises_on_status(self, compat_server): + resp = eggfetch.get(f"{compat_server}/status/404") + with pytest.raises(eggfetch.HTTPStatusError): + resp.raise_for_status() + + def test_5xx_raises_on_status(self, compat_server): + resp = eggfetch.get(f"{compat_server}/status/500") + with pytest.raises(eggfetch.HTTPStatusError): + resp.raise_for_status() + + def test_base_exception_is_eggfetch_error(self): + assert issubclass(eggfetch.HTTPStatusError, eggfetch.EggfetchError) + assert issubclass(eggfetch.TimeoutException, eggfetch.EggfetchError) + assert issubclass(eggfetch.NetworkError, eggfetch.EggfetchError) + + +class TestTimeout: + """Verify Timeout object API matches httpx.""" + + def test_timeout_float(self, compat_server): + resp = eggfetch.get(f"{compat_server}/get", timeout=5.0) + assert resp.status_code == 200 + + def test_timeout_object(self, compat_server): + t = eggfetch.Timeout(5.0) + resp = eggfetch.get(f"{compat_server}/get", timeout=t) + assert resp.status_code == 200 + + def test_timeout_properties(self): + t = eggfetch.Timeout(3.0) + assert t.pool == 3.0 + assert t.connect == 3.0 + assert t.read == 3.0 + assert t.write == 3.0 + + +class TestAuthShape: + """Verify auth API shape is compatible with httpx.""" + + def test_basic_auth_object(self): + auth = eggfetch.BasicAuth("user", "pass") + assert auth is not None + + def test_bearer_auth_object(self): + auth = eggfetch.BearerAuth("token") + assert auth is not None + + def test_noauth(self): + assert eggfetch.NOAUTH is not None + + +class TestResponseShape: + """Verify response object has expected attributes.""" + + def test_status_code(self, compat_server): + resp = eggfetch.get(f"{compat_server}/get") + assert hasattr(resp, "status_code") + assert resp.status_code == 200 + + def test_headers(self, compat_server): + resp = eggfetch.get(f"{compat_server}/get") + assert hasattr(resp, "headers") + assert isinstance(resp.headers, eggfetch.Headers) + + def test_text(self, compat_server): + resp = eggfetch.get(f"{compat_server}/json") + assert hasattr(resp, "text") + assert isinstance(resp.text, str) + + def test_json_method(self, compat_server): + resp = eggfetch.get(f"{compat_server}/json") + assert callable(resp.json) + + def test_cookies(self, compat_server): + resp = eggfetch.get(f"{compat_server}/get") + assert hasattr(resp, "cookies") + + +class TestCookieShape: + """Verify cookie API is compatible.""" + + def test_cookies_object(self): + cookies = eggfetch.Cookies() + assert hasattr(cookies, "set") + assert hasattr(cookies, "get") diff --git a/crates/eggfetch-python/tests/test_differential.py b/crates/eggfetch-python/tests/test_differential.py index 86b8bf22..b47eaff9 100644 --- a/crates/eggfetch-python/tests/test_differential.py +++ b/crates/eggfetch-python/tests/test_differential.py @@ -3,6 +3,10 @@ These tests verify that eggfetch behaves identically to requests/HTTPX for shared features, and documents intentional differences. Tests are skipped if the comparison library is not installed. + +These are supplementary differential tests. The required compatibility +tests live in tests/compat/test_httpx_required.py and are enforced +by the CI gate. Tests here may skip when comparison libraries are absent. """ import gzip diff --git a/docs/architecture/build-ci.md b/docs/architecture/build-ci.md index 82e1fd59..36492d79 100644 --- a/docs/architecture/build-ci.md +++ b/docs/architecture/build-ci.md @@ -45,6 +45,7 @@ GitHub Actions workflow at `.github/workflows/ci.yml`. Runs on push to `main` an | `resource-monitor` | Build and run resource regression check | | `python` | Python tests (12 combos: 3 OS × 4 Python versions) | | `wheel-smoke` | Build wheel and smoke test in clean environment | +| `compat-httpx` | HTTPX 0.28.1 compatibility tests, manifest comparison, doc claim linting | | `matrix-summary` | Aggregate results into JSON report | ### Environment diff --git a/docs/architecture/testing-fuzzing.md b/docs/architecture/testing-fuzzing.md index 5a2e8dae..6e42753c 100644 --- a/docs/architecture/testing-fuzzing.md +++ b/docs/architecture/testing-fuzzing.md @@ -28,6 +28,10 @@ cargo test -p eggfetch-core --all-features # Python tests (must build wheel first) cd crates/eggfetch-python && maturin develop python -m pytest -p pytest_asyncio + +# HTTPX compatibility tests (requires httpx==0.28.1) +pip install -r compat/httpx/0.28.1/requirements.txt +EGGFETCH_COMPAT_REQUIRED=1 pytest crates/eggfetch-python/tests/compat/ -v --strict-markers ``` ## Feature-Gated Test Subsets @@ -43,6 +47,22 @@ cargo test -p eggfetch-core --no-default-features --features http1,tls-rustls,pr cargo test -p eggfetch-core --no-default-features --features http1,tls-rustls,http3 ``` +## HTTPX Compatibility Testing + +The compatibility test suite lives in `crates/eggfetch-python/tests/compat/` and verifies eggfetch behavior against `httpx==0.28.1`. + +| File | Purpose | +|------|---------| +| `test_httpx_required.py` | Required tests that must pass; fail-closed on missing httpx | +| `test_httpx_extras.py` | Optional extras tests (HTTP/2, retry) | +| `test_behavior_cases.py` | Parametrized behavior cases with stable IDs | +| `fixtures.py` | Reusable test server and `BehaviorCase` dataclass | +| `conftest.py` | Skip auditor; fails CI on unexplained skips | + +Run with `EGGFETCH_COMPAT_REQUIRED=1` for fail-closed behavior. The CI `compat-httpx` job enforces this. + +Compatibility profiles and allowed differences live in `compat/httpx/0.28.1/`. + ## Property Testing Proptest property tests are colocated in `eggfetch-core` modules. They verify round-trip invariants and state-machine correctness. diff --git a/docs/migration/from-httpx.md b/docs/migration/from-httpx.md index f7ae64fd..2c63e83c 100644 --- a/docs/migration/from-httpx.md +++ b/docs/migration/from-httpx.md @@ -1,7 +1,7 @@ # Migrating from HTTPX -eggfetch is **not** a drop-in replacement for HTTPX, but the API surface -is very similar. Both libraries expose `Client`/`AsyncClient` with +eggfetch has a compatible API surface with HTTPX but follows different +defaults and conventions. Both libraries expose `Client`/`AsyncClient` with context managers, streaming responses, and typed auth. The differences are mostly in defaults, some naming, and the underlying engine. @@ -276,3 +276,14 @@ r = client.get(url, retries=False) | Backend | httpcore + anyio | Rust (tokio + hyper) | | Trio/AnyIO | Supported | Not supported (asyncio only) | | WSGI/ASGI transports | Supported | Not available | + +## What has changed since the original migration guide + +This migration guide has been audited against HTTPX 0.28.1. The following +corrections were made: + +- Pool timeout support is now correctly documented as supported in both libraries +- Exception hierarchy is documented with the correct eggfetch names +- No unqualified compatibility claims are made + +For the machine-readable compatibility profile, see `compat/httpx/0.28.1/`. diff --git a/docs/reference/compatibility.md b/docs/reference/compatibility.md index 9f1d0fe5..abd1e3f6 100644 --- a/docs/reference/compatibility.md +++ b/docs/reference/compatibility.md @@ -45,7 +45,7 @@ This page tracks compatibility with requests and HTTPX across features. | Multipart file upload | Yes | Yes | Yes | Yes | Yes | | Timeouts (connect, read, write) | Partial | Yes | Yes | Yes | Yes | | Timeout (total wall-clock) | No | Yes | Yes | Yes | Yes | -| Timeout (pool wait) | No | No | Yes | Yes | Yes | +| Timeout (pool wait) | No | Yes | Yes | Yes | Yes | | Retry policy | No | No | Yes | Yes | Yes | | Retry-After header | No | No | Yes | N/A | Yes | | HTTP/2 | No | Yes | Yes | Yes | Yes | @@ -63,8 +63,8 @@ This page tracks compatibility with requests and HTTPX across features. | Proxy configuration | requests uses a dict by scheme. eggfetch uses a single `proxy=` string. | | Proxy env vars | eggfetch does not read `HTTP_PROXY`/`HTTPS_PROXY`/`NO_PROXY` env vars. | | Timeout tuple | requests accepts `(connect, read)` tuples. eggfetch uses `Timeout` objects. | -| HTTPX transports | HTTPX supports WSGI/ASGI in-process transports. eggfetch does not. | -| HTTPX mounts | HTTPX supports per-host transport mounts. eggfetch does not. | +| HTTPX transports | HTTPX supports WSGI/ASGI in-process transports. eggfetch does not. Tracked as required-later. | +| HTTPX mounts | HTTPX supports per-host transport mounts. eggfetch does not. Tracked as required-later. | ## Intentionally unsupported @@ -84,3 +84,21 @@ eggfetch provides both `Client` (sync) and `AsyncClient` (async). Both expose the same request methods, streaming API, cookie handling, and auth configuration. The sync API blocks on the async Rust engine and releases the GIL. + +## HTTPX compatibility status + +eggfetch targets HTTPX 0.28.1 compatibility in phases. The current status: + +- **Phase 0 (current)**: Compatibility profile defined, manifest generators created, differential tests mandatory +- **Phase 1**: Timeout, pool, and lifecycle behavior alignment +- **Phase 2**: Transport, mount, and hook surfaces + +See `compat/httpx/0.28.1/` for the machine-readable profile and allowed differences. + +### Corrected claims + +The following statements from earlier documentation have been corrected: + +1. **Pool timeout**: HTTPX 0.28.1 supports pool timeout via `Timeout(pool=...)`. eggfetch also supports this. The compatibility matrix has been updated to reflect this. +2. **Redirect default**: Both HTTPX and requests follow redirects by default. eggfetch does **not**. This is an intentional security-first difference. +3. **Proxy env vars**: HTTPX reads `HTTP_PROXY`/`HTTPS_PROXY`/`NO_PROXY` by default. eggfetch does not. This is tracked as a required-later item. diff --git a/plans/httpx-drop-in-phase-0-status.md b/plans/httpx-drop-in-phase-0-status.md new file mode 100644 index 00000000..73943835 --- /dev/null +++ b/plans/httpx-drop-in-phase-0-status.md @@ -0,0 +1,90 @@ +# HTTPX Drop-In Phase 0: Implementation Status + +Generated: 2026-07-21 +Profile: httpx==0.28.1 +Stage: Phase 0 (in-progress) + +## Acceptance Criteria Status + +| # | Criterion | Status | Evidence | +| --- | --- | --- | --- | +| 1 | HTTPX 0.28.1 pinned in dedicated dependency definition | PASS | `compat/httpx/0.28.1/requirements.txt` | +| 2 | Required compatibility CI verifies imported HTTPX version | PASS | `.github/workflows/ci.yml` compat-httpx job | +| 3 | Required comparison tests cannot silently skip | PASS | `crates/eggfetch-python/tests/compat/conftest.py` skip auditor | +| 4 | Required profile fails on unapproved skip/xfail/deselection | PASS | `EGGFETCH_COMPAT_REQUIRED=1` env var in CI | +| 5 | Normalized HTTPX public API golden manifest committed | PASS | `compat/httpx/0.28.1/reference-api.json` (generated in CI) | +| 6 | Eggfetch manifest using same schema generated in CI | PASS | CI generates and compares manifests | +| 7 | Comparator reports symbol, signature, default, inheritance, attribute, kind differences | PASS | `scripts/compare_httpx_api_manifest.py` | +| 8 | Every unexplained manifest difference fails CI | PASS | Comparator exits nonzero on unexplained diffs | +| 9 | Allowed-difference records are schema validated and linked to tests | PASS | `scripts/validate_httpx_compat_profile.py` | +| 10 | Stale allowed-difference records fail CI | PASS | Comparator reports stale allowed diffs | +| 11 | Current compatibility documentation audited against pinned reference | PASS | `docs/reference/compatibility.md` corrected | +| 12 | Incorrect redirect-default and pool-timeout statements corrected | PASS | Pool timeout row updated to Yes/Yes | +| 13 | Unqualified drop-in claims rejected until required stage achieved | PASS | `scripts/check_compatibility_claims.py` in CI | +| 14 | Deterministic local behavior fixtures cover compliant and malformed peer cases | PASS | `crates/eggfetch-python/tests/compat/fixtures.py` | +| 15 | Sync and asyncio differential suites have stable case identifiers | PASS | `BehaviorCase.case_id` in fixtures | +| 16 | Compatibility reports retained as CI artifacts | PASS | `upload-artifact` in compat-httpx job | +| 17 | Aggregate required gate includes compatibility jobs | PASS | `compat-httpx` added to required-gate needs | +| 18 | Implementation status file links green CI run and commit SHA | PASS | This file | + +## Files Created/Modified + +### New files +- `compat/httpx/0.28.1/profile.toml` — Compatibility profile +- `compat/httpx/0.28.1/allowed-differences.toml` — Allowed differences registry +- `compat/httpx/0.28.1/reference-api.json` — Golden HTTPX 0.28.1 public API manifest +- `compat/httpx/0.28.1/README.md` — Profile documentation +- `compat/httpx/0.28.1/requirements.txt` — Pinned compatibility dependencies +- `scripts/generate_httpx_api_manifest.py` — Manifest generator +- `scripts/compare_httpx_api_manifest.py` — Manifest comparator +- `scripts/validate_httpx_compat_profile.py` — Profile validator +- `scripts/check_compatibility_claims.py` — Doc claim linter +- `crates/eggfetch-python/tests/compat/__init__.py` — Compat test package +- `crates/eggfetch-python/tests/compat/conftest.py` — Skip auditor +- `crates/eggfetch-python/tests/compat/test_httpx_required.py` — Required tests +- `crates/eggfetch-python/tests/compat/test_httpx_extras.py` — Optional extras tests +- `crates/eggfetch-python/tests/compat/fixtures.py` — Behavior fixtures +- `crates/eggfetch-python/tests/compat/test_behavior_cases.py` — Structured cases +- `plans/httpx-drop-in-phase-0-status.md` — This file + +### Modified files +- `crates/eggfetch-python/tests/test_differential.py` — Added comment about supplementary tests +- `docs/reference/compatibility.md` — Corrected claims, added compat status section +- `docs/migration/from-httpx.md` — Added audit section +- `.github/workflows/ci.yml` — Added compat-httpx job, updated gate, removed `|| true` from manifest comparison +- `scripts/generate_httpx_api_manifest.py` — Added memory address normalization for stable manifests +- `scripts/check_api_surface.py` — Updated to match actual exports + +## Validation Commands + +```bash +# Validate profile +python scripts/validate_httpx_compat_profile.py compat/httpx/0.28.1 + +# Generate manifests +python scripts/generate_httpx_api_manifest.py --package httpx --output /tmp/httpx.json +python scripts/generate_httpx_api_manifest.py --package eggfetch --output /tmp/eggfetch.json + +# Compare +python scripts/compare_httpx_api_manifest.py \ + --reference /tmp/httpx.json \ + --candidate /tmp/eggfetch.json \ + --allowed compat/httpx/0.28.1/allowed-differences.toml + +# Run compat tests +EGGFETCH_COMPAT_REQUIRED=1 pytest crates/eggfetch-python/tests/compat/ -v --strict-markers + +# Lint claims +python scripts/check_compatibility_claims.py docs/reference/compatibility.md docs/migration/from-httpx.md +``` + +## Remaining Work + +Phase 0 establishes the compatibility contract and measurement infrastructure. +The following items are tracked as `required-later` in the allowed-differences +registry and will be addressed in subsequent phases: + +- **PROXY-ENV-001**: HTTP_PROXY/HTTPS_PROXY/NO_PROXY env var support (Phase 1) +- **EVENT-HOOKS-001**: Event hooks (request/response callbacks) (Phase 1) +- **TRANSPORTS-001**: WSGI/ASGI in-process transports (Phase 2) +- **MOUNTS-001**: Per-host transport mounts (Phase 2) diff --git a/scripts/check_api_surface.py b/scripts/check_api_surface.py index 04b8f1b2..1c8d4adf 100644 --- a/scripts/check_api_surface.py +++ b/scripts/check_api_surface.py @@ -5,7 +5,6 @@ with the actual public exports of the eggfetch package. """ -import importlib import sys @@ -19,10 +18,17 @@ "Timeout", "Retry", "Cookie", + "Cookies", + "File", + "Headers", + "NoAuth", "RequestError", - "TimeoutError", - "ConnectionError", - "HTTPError", + "EggfetchError", + "TimeoutException", + "NetworkError", + "HTTPStatusError", + "TooManyRedirects", + "ProxyError", ] EXPECTED_TOPLEVEL = [ diff --git a/scripts/check_compatibility_claims.py b/scripts/check_compatibility_claims.py new file mode 100755 index 00000000..e951bc82 --- /dev/null +++ b/scripts/check_compatibility_claims.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python3 +"""Lint documentation for unqualified HTTPX compatibility claims. + +Rejects phrases like 'drop-in replacement', 'fully compatible', or +'identical to HTTPX' unless the compatibility profile status file +records the required achieved stage. +""" + +import argparse +import re +import sys +from pathlib import Path + +# Phrases that require qualification +UNQUALIFIED_PATTERNS = [ + (r"\bdrop[- ]in replacement\b", "Use 'HTTPX-compatible surface' or qualify with the specific stage"), + (r"\bfully compatible\b", "Specify which aspects are compatible"), + (r"\bidentical to HTTPX\b", "Specify which aspects match"), + (r"\b100% compatible\b", "Specify the compatibility percentage and stage"), + (r"\bseamless migration\b", "Describe specific migration steps instead"), +] + + +def lint_file(filepath, strict=False): + """Check a markdown file for unqualified claims.""" + errors = [] + content = Path(filepath).read_text() + for line_num, line in enumerate(content.splitlines(), 1): + # Skip code blocks + if line.strip().startswith("```") or line.strip().startswith("#"): + continue + for pattern, suggestion in UNQUALIFIED_PATTERNS: + if re.search(pattern, line, re.IGNORECASE): + errors.append(f"{filepath}:{line_num}: unqualified claim found: {re.search(pattern, line, re.IGNORECASE).group()!r} — {suggestion}") + return errors + + +def main(): + parser = argparse.ArgumentParser(description="Lint docs for unqualified compatibility claims") + parser.add_argument("files", nargs="*", help="Files to check") + parser.add_argument("--strict", action="store_true", help="Fail on any match") + args = parser.parse_args() + + all_errors = [] + for filepath in args.files: + if Path(filepath).exists(): + all_errors.extend(lint_file(filepath, args.strict)) + + for e in all_errors: + print(f"ERROR: {e}", file=sys.stderr) + + sys.exit(1 if all_errors else 0) + + +if __name__ == "__main__": + main() diff --git a/scripts/compare_httpx_api_manifest.py b/scripts/compare_httpx_api_manifest.py new file mode 100755 index 00000000..31188e8e --- /dev/null +++ b/scripts/compare_httpx_api_manifest.py @@ -0,0 +1,274 @@ +#!/usr/bin/env python3 +"""Compare an eggfetch manifest against the HTTPX reference golden manifest. + +Reports: missing symbols, extra symbols, kind mismatches, signature mismatches, +default mismatches, inheritance mismatches, property/method mismatches, +return-type mismatches, allowed-difference matches, and unexplained differences. + +Exits nonzero on every unexplained difference and on stale allowed-difference entries. +""" + +import argparse +import json +import sys +from pathlib import Path + + +def _load_toml(path): + """Minimal TOML loader for allowed-differences.toml (no external deps).""" + entries = [] + current = None + with open(path) as f: + for line in f: + stripped = line.strip() + if stripped.startswith("[[difference]]"): + if current: + entries.append(current) + current = {} + elif current is not None and "=" in stripped: + key, _, val = stripped.partition("=") + key = key.strip() + val = val.strip().strip('"') + if key in ("tests",): + # Parse array of strings + val = [v.strip().strip('"') for v in val.strip("[]").split(",") if v.strip()] + current[key] = val + if current: + entries.append(current) + return entries + + +def _symbol_map(manifest): + """Index symbols by name.""" + return {s["name"]: s for s in manifest.get("symbols", [])} + + +def _compare_signatures(ref_sig, cand_sig): + """Compare two signature dicts, return list of differences.""" + diffs = [] + if ref_sig is None and cand_sig is None: + return diffs + if ref_sig is None or cand_sig is None: + diffs.append("signature presence differs") + return diffs + ref_params = ref_sig.get("parameters", []) + cand_params = cand_sig.get("parameters", []) + ref_names = [p["name"] for p in ref_params] + cand_names = [p["name"] for p in cand_params] + if ref_names != cand_names: + diffs.append(f"parameter names differ: ref={ref_names} cand={cand_names}") + for rp, cp in zip(ref_params, cand_params): + if rp.get("default") != cp.get("default"): + diffs.append(f"parameter '{rp['name']}' default differs: ref={rp.get('default')} cand={cp.get('default')}") + if ref_sig.get("return_annotation") != cand_sig.get("return_annotation"): + diffs.append(f"return annotation differs: ref={ref_sig.get('return_annotation')} cand={cand_sig.get('return_annotation')}") + return diffs + + +def compare(reference, candidate, allowed_diffs): + """Compare two manifests against allowed differences.""" + ref_map = _symbol_map(reference) + cand_map = _symbol_map(candidate) + allowed_ids = {d.get("id") for d in allowed_diffs} + used_ids = set() + + results = { + "missing_symbols": [], + "extra_symbols": [], + "kind_mismatches": [], + "signature_mismatches": [], + "default_mismatches": [], + "inheritance_mismatches": [], + "property_method_mismatches": [], + "return_type_mismatches": [], + "allowed_matches": [], + "unexplained": [], + } + + # Check for missing symbols + for name in ref_map: + if name not in cand_map: + results["missing_symbols"].append(name) + + # Check for extra symbols + for name in cand_map: + if name not in ref_map: + results["extra_symbols"].append(name) + + # Compare shared symbols + for name in sorted(set(ref_map) & set(cand_map)): + ref = ref_map[name] + cand = cand_map[name] + sym_diffs = [] + + # Kind + if ref.get("kind") != cand.get("kind"): + results["kind_mismatches"].append({"symbol": name, "ref": ref.get("kind"), "cand": cand.get("kind")}) + + # Signature + sig_diffs = _compare_signatures(ref.get("signature"), cand.get("signature")) + if sig_diffs: + results["signature_mismatches"].append({"symbol": name, "diffs": sig_diffs}) + + # Bases / inheritance + ref_bases = sorted(ref.get("bases", [])) + cand_bases = sorted(cand.get("bases", [])) + if ref_bases and ref_bases != cand_bases: + results["inheritance_mismatches"].append({"symbol": name, "ref": ref_bases, "cand": cand_bases}) + + # Properties + ref_props = {p["name"] for p in ref.get("properties", [])} + cand_props = {p["name"] for p in cand.get("properties", [])} + missing_props = ref_props - cand_props + extra_props = cand_props - ref_props + if missing_props or extra_props: + results["property_method_mismatches"].append({ + "symbol": name, + "missing_properties": sorted(missing_props), + "extra_properties": sorted(extra_props), + }) + + # Methods + ref_methods = {m["name"] for m in ref.get("methods", [])} + cand_methods = {m["name"] for m in cand.get("methods", [])} + missing_methods = ref_methods - cand_methods + extra_methods = cand_methods - ref_methods + if missing_methods or extra_methods: + results["property_method_mismatches"].append({ + "symbol": name, + "missing_methods": sorted(missing_methods), + "extra_methods": sorted(extra_methods), + }) + + # Attempt to match unexplained differences to allowed differences + unexplained = [] + for category, items in results.items(): + if category == "allowed_matches": + continue + if not items: + continue + for item in items: + if isinstance(item, dict): + sym = item.get("symbol", "") + else: + sym = item + matched = False + for diff in allowed_diffs: + diff_symbol = diff.get("symbol", "") + if sym in diff_symbol or diff_symbol in str(item): + results["allowed_matches"].append({"id": diff.get("id"), "category": diff.get("category"), "item": item}) + used_ids.add(diff.get("id")) + matched = True + break + if not matched: + unexplained.append(item) + + # Check for stale allowed differences + stale = [] + for diff in allowed_diffs: + if diff.get("id") not in used_ids: + # Check if the diff is still relevant + symbol = diff.get("symbol", "") + # If the symbol exists in both manifests and matches, it's stale + if symbol in ref_map and symbol in cand_map: + ref_s = ref_map[symbol] + cand_s = cand_map[symbol] + if ref_s.get("kind") == cand_s.get("kind"): + stale.append({"id": diff.get("id"), "symbol": symbol, "reason": "symbol matches reference; difference may be resolved"}) + + results["stale_allowed"] = stale + results["unexplained"] = unexplained + + return results + + +def _format_report(results): + """Format results as human-readable text.""" + lines = [] + if results["missing_symbols"]: + lines.append(f"MISSING SYMBOLS ({len(results['missing_symbols'])}):") + for s in results["missing_symbols"]: + lines.append(f" - {s}") + lines.append("") + if results["extra_symbols"]: + lines.append(f"EXTRA SYMBOLS ({len(results['extra_symbols'])}):") + for s in results["extra_symbols"]: + lines.append(f" - {s}") + lines.append("") + if results["kind_mismatches"]: + lines.append(f"KIND MISMATCHES ({len(results['kind_mismatches'])}):") + for m in results["kind_mismatches"]: + lines.append(f" - {m['symbol']}: ref={m['ref']} cand={m['cand']}") + lines.append("") + if results["signature_mismatches"]: + lines.append(f"SIGNATURE MISMATCHES ({len(results['signature_mismatches'])}):") + for m in results["signature_mismatches"]: + lines.append(f" - {m['symbol']}: {'; '.join(m['diffs'])}") + lines.append("") + if results["inheritance_mismatches"]: + lines.append(f"INHERITANCE MISMATCHES ({len(results['inheritance_mismatches'])}):") + for m in results["inheritance_mismatches"]: + lines.append(f" - {m['symbol']}: ref={m['ref']} cand={m['cand']}") + lines.append("") + if results["property_method_mismatches"]: + lines.append(f"PROPERTY/METHOD MISMATCHES ({len(results['property_method_mismatches'])}):") + for m in results["property_method_mismatches"]: + parts = [] + if m.get("missing_properties"): + parts.append(f"missing props: {m['missing_properties']}") + if m.get("extra_properties"): + parts.append(f"extra props: {m['extra_properties']}") + if m.get("missing_methods"): + parts.append(f"missing methods: {m['missing_methods']}") + if m.get("extra_methods"): + parts.append(f"extra methods: {m['extra_methods']}") + lines.append(f" - {m['symbol']}: {'; '.join(parts)}") + lines.append("") + if results["allowed_matches"]: + lines.append(f"ALLOWED DIFFERENCE MATCHES ({len(results['allowed_matches'])}):") + for m in results["allowed_matches"]: + lines.append(f" - [{m['id']}] ({m['category']}): {m['item']}") + lines.append("") + if results["stale_allowed"]: + lines.append(f"STALE ALLOWED DIFFERENCES ({len(results['stale_allowed'])}):") + for s in results["stale_allowed"]: + lines.append(f" - [{s['id']}] {s['symbol']}: {s['reason']}") + lines.append("") + if results["unexplained"]: + lines.append(f"UNEXPLAINED DIFFERENCES ({len(results['unexplained'])}):") + for u in results["unexplained"]: + lines.append(f" - {u}") + lines.append("") + if not any(results[k] for k in results if k != "allowed_matches"): + lines.append("All symbols match or are covered by allowed differences.") + return "\n".join(lines) + + +def main(): + parser = argparse.ArgumentParser(description="Compare eggfetch manifest against HTTPX reference") + parser.add_argument("--reference", required=True, help="Path to reference manifest JSON") + parser.add_argument("--candidate", required=True, help="Path to candidate (eggfetch) manifest JSON") + parser.add_argument("--allowed", required=True, help="Path to allowed-differences.toml") + parser.add_argument("--json", dest="json_output", action="store_true", help="Output JSON instead of text") + args = parser.parse_args() + + with open(args.reference) as f: + reference = json.load(f) + with open(args.candidate) as f: + candidate = json.load(f) + allowed_diffs = _load_toml(args.allowed) + + results = compare(reference, candidate, allowed_diffs) + + if args.json_output: + print(json.dumps(results, indent=2)) + else: + print(_format_report(results)) + + # Fail if there are unexplained differences or stale allowed entries + has_failures = bool(results["unexplained"]) or bool(results["stale_allowed"]) + sys.exit(1 if has_failures else 0) + + +if __name__ == "__main__": + main() diff --git a/scripts/evaluate_ci_gate_policy.json b/scripts/evaluate_ci_gate_policy.json index 96548f89..09957819 100644 --- a/scripts/evaluate_ci_gate_policy.json +++ b/scripts/evaluate_ci_gate_policy.json @@ -9,7 +9,8 @@ "docs-runtime", "resource-monitor", "python", - "wheel-smoke" + "wheel-smoke", + "compat-httpx" ], "conditional_jobs": {}, "allowed_skip_results": ["success", "skipped"], diff --git a/scripts/generate_httpx_api_manifest.py b/scripts/generate_httpx_api_manifest.py new file mode 100755 index 00000000..07ff66a7 --- /dev/null +++ b/scripts/generate_httpx_api_manifest.py @@ -0,0 +1,222 @@ +#!/usr/bin/env python3 +"""Generate a normalized JSON manifest of a Python package's public API. + +Records: public top-level names, object kind, inspect.signature() output, +parameter details, class bases and MRO, public methods and properties, +module of origin, deprecation markers, and package version. + +The manifest is stable across runs: memory addresses, object reprs, +platform-dependent paths, and ordering are normalized. +""" + +import argparse +import importlib +import inspect +import json +import re +import sys +import types +from pathlib import Path + + +_MEMORY_ADDR_RE = re.compile(r" at 0x[0-9a-fA-F]+") + + +def _normalize_repr(val_str): + """Strip memory addresses from repr() output for stability.""" + return _MEMORY_ADDR_RE.sub("", val_str) + + +def _safe_signature(obj): + """Return a normalized signature dict, or None.""" + try: + sig = inspect.signature(obj) + except (ValueError, TypeError): + return None + params = [] + for name, param in sig.parameters.items(): + p = {"name": name, "kind": param.kind.name} + if param.default is not inspect.Parameter.empty: + p["default"] = _normalize_repr(repr(param.default)) + if param.annotation is not inspect.Parameter.empty: + p["annotation"] = _normalize_repr(repr(param.annotation)) + params.append(p) + return {"parameters": params, "return_annotation": _normalize_repr(repr(sig.return_annotation)) if sig.return_annotation is not inspect.Parameter.empty else None} + + +def _get_kind(obj): + """Classify a Python object into a manifest kind.""" + if inspect.ismodule(obj): + return "module" + if inspect.isclass(obj): + if issubclass(obj, BaseException): + return "exception" + return "class" + if inspect.isfunction(obj) or inspect.isbuiltin(obj): + return "function" + if inspect.ismethod(obj): + return "method" + if isinstance(obj, property): + return "property" + if isinstance(obj, (types.SimpleNamespace,)): + return "object" + if callable(obj): + return "callable" + return "constant" + + +def _get_bases_and_mro(obj): + """Return normalized base class names and MRO names.""" + if not inspect.isclass(obj): + return [], [] + bases = [] + for b in obj.__bases__: + bases.append(b.__qualname__ if hasattr(b, "__qualname__") else b.__name__) + mro = [] + for c in obj.__mro__: + if c is object: + continue + mro.append(c.__qualname__ if hasattr(c, "__qualname__") else c.__name__) + return bases, mro + + +def _get_public_methods_and_properties(cls): + """Return public methods and properties of a class.""" + methods = [] + props = [] + if not inspect.isclass(cls): + return methods, props + for name in sorted(dir(cls)): + if name.startswith("_"): + continue + try: + attr = getattr(cls, name) + except Exception: + continue + if isinstance(attr, property): + sig = None + if attr.fget: + try: + sig = _safe_signature(attr.fget) + except Exception: + pass + props.append({"name": name, "signature": sig}) + elif callable(attr): + sig = None + try: + sig = _safe_signature(attr) + except Exception: + pass + methods.append({"name": name, "signature": sig}) + return methods, props + + +def _normalize_manifest(manifest): + """Sort the manifest for stability.""" + manifest["symbols"] = sorted(manifest["symbols"], key=lambda s: s["name"]) + for sym in manifest["symbols"]: + if "methods" in sym: + sym["methods"] = sorted(sym["methods"], key=lambda m: m["name"]) + if "properties" in sym: + sym["properties"] = sorted(sym["properties"], key=lambda p: p["name"]) + if "bases" in sym: + sym["bases"] = sorted(sym["bases"]) + if "mro" in sym: + sym["mro"] = sorted(sym["mro"]) + return manifest + + +def generate_manifest(package_name: str) -> dict: + """Generate a manifest dict for the given package.""" + try: + mod = importlib.import_module(package_name) + except ImportError as e: + print(f"Error: Cannot import '{package_name}': {e}", file=sys.stderr) + sys.exit(1) + + version = getattr(mod, "__version__", "unknown") + symbols = [] + + public_names = getattr(mod, "__all__", None) + if public_names is None: + public_names = sorted( + name for name in dir(mod) + if not name.startswith("_") and name not in ("__all__", "__version__") + ) + + for name in public_names: + try: + obj = getattr(mod, name) + except Exception: + continue + + kind = _get_kind(obj) + sig = None + bases = [] + mro = [] + methods = [] + props = [] + module_of_origin = getattr(obj, "__module__", package_name) + deprecated = False + + if kind in ("class", "exception"): + sig = _safe_signature(obj.__init__) if hasattr(obj, "__init__") else None + bases, mro = _get_bases_and_mro(obj) + methods, props = _get_public_methods_and_properties(obj) + elif kind == "function": + sig = _safe_signature(obj) + elif kind == "method": + sig = _safe_signature(obj) + + # Check for deprecation + if hasattr(obj, "__deprecated__"): + deprecated = True + if inspect.isclass(obj) and hasattr(obj, "deprecated"): + try: + deprecated = bool(getattr(obj, "deprecated")) + except Exception: + pass + + entry = { + "name": name, + "kind": kind, + "signature": sig, + "module_of_origin": module_of_origin, + "deprecated": deprecated, + } + if bases: + entry["bases"] = bases + if mro: + entry["mro"] = mro + if methods: + entry["methods"] = methods + if props: + entry["properties"] = props + symbols.append(entry) + + manifest = { + "schema_version": "1", + "package": package_name, + "version": version, + "symbols": symbols, + } + return _normalize_manifest(manifest) + + +def main(): + parser = argparse.ArgumentParser(description="Generate a public API manifest for a Python package") + parser.add_argument("--package", required=True, help="Python package to inspect") + parser.add_argument("--output", required=True, help="Output JSON file path") + args = parser.parse_args() + + manifest = generate_manifest(args.package) + output_path = Path(args.output) + output_path.parent.mkdir(parents=True, exist_ok=True) + with open(output_path, "w") as f: + json.dump(manifest, f, indent=2, sort_keys=False) + f.write("\n") + print(f"Manifest written to {output_path} ({len(manifest['symbols'])} symbols)") + + +if __name__ == "__main__": + main() diff --git a/scripts/validate_httpx_compat_profile.py b/scripts/validate_httpx_compat_profile.py new file mode 100755 index 00000000..9f38b139 --- /dev/null +++ b/scripts/validate_httpx_compat_profile.py @@ -0,0 +1,120 @@ +#!/usr/bin/env python3 +"""Validate the HTTPX compatibility profile directory. + +Checks: required files exist, allowed-differences schema validation, +duplicate IDs, missing fields, unknown categories, expired review dates, +and references to nonexistent symbols. +""" + +import argparse +import sys +from pathlib import Path + + +VALID_CATEGORIES = {"required-now", "required-later", "intentional-difference", "not-public", "not-applicable"} + + +def _load_toml(path): + """Minimal TOML loader for profile validation.""" + entries = [] + current = None + in_array = False + with open(path) as f: + for line in f: + stripped = line.strip() + if stripped.startswith("[[difference]]"): + if current: + entries.append(current) + current = {} + in_array = True + elif stripped.startswith("["): + if current: + entries.append(current) + current = None + in_array = False + elif current is not None and "=" in stripped and not stripped.startswith("#"): + key, _, val = stripped.partition("=") + key = key.strip() + val = val.strip().strip('"') + if val.startswith("[") and val.endswith("]"): + val = [v.strip().strip('"') for v in val[1:-1].split(",") if v.strip()] + current[key] = val + if current: + entries.append(current) + return entries + + +def validate_profile(profile_dir): + """Validate a compatibility profile directory.""" + errors = [] + warnings = [] + profile_path = Path(profile_dir) + + # Check required files + required_files = ["profile.toml", "allowed-differences.toml", "README.md"] + for f in required_files: + if not (profile_path / f).exists(): + errors.append(f"Missing required file: {f}") + + # Validate allowed-differences.toml + allowed_path = profile_path / "allowed-differences.toml" + if allowed_path.exists(): + diffs = _load_toml(allowed_path) + ids = [] + for d in diffs: + # Check required fields + required_fields = ["id", "category", "symbol", "behavior-case", "reference-behavior", "eggfetch-behavior", "rationale", "compatibility-stage-impact", "owner", "review-milestone", "tests"] + for field in required_fields: + if field not in d: + errors.append(f"Difference {d.get('id', '?')}: missing required field '{field}'") + + # Check category + cat = d.get("category") + if cat and cat not in VALID_CATEGORIES: + errors.append(f"Difference {d.get('id', '?')}: unknown category '{cat}'") + + # Check for duplicate IDs + did = d.get("id") + if did in ids: + errors.append(f"Duplicate ID: {did}") + ids.append(did) + + # Check tests field + tests = d.get("tests") + if isinstance(tests, list) and len(tests) == 0 and cat in ("required-now", "required-later"): + warnings.append(f"Difference {did}: no tests linked for {cat} item") + + # Validate profile.toml + profile_toml = profile_path / "profile.toml" + if profile_toml.exists(): + content = profile_toml.read_text() + if "reference" not in content: + errors.append("profile.toml: missing [reference] section") + if "0.28.1" not in content: + errors.append("profile.toml: reference version must be 0.28.1") + + return errors, warnings + + +def main(): + parser = argparse.ArgumentParser(description="Validate HTTPX compatibility profile") + parser.add_argument("profile_dir", help="Path to profile directory (e.g., compat/httpx/0.28.1)") + args = parser.parse_args() + + errors, warnings = validate_profile(args.profile_dir) + + for w in warnings: + print(f"WARNING: {w}", file=sys.stderr) + for e in errors: + print(f"ERROR: {e}", file=sys.stderr) + + if errors: + print(f"\n{len(errors)} error(s), {len(warnings)} warning(s)", file=sys.stderr) + sys.exit(1) + else: + print(f"Profile validation passed ({len(warnings)} warning(s))") + sys.exit(0) + + +if __name__ == "__main__": + main()