httpr 0.7.4__tar.gz → 0.7.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {httpr-0.7.4 → httpr-0.7.5}/.github/workflows/CI.yml +27 -4
- {httpr-0.7.4 → httpr-0.7.5}/Cargo.lock +1 -1
- {httpr-0.7.4 → httpr-0.7.5}/Cargo.toml +1 -1
- {httpr-0.7.4 → httpr-0.7.5}/PKG-INFO +2 -2
- {httpr-0.7.4 → httpr-0.7.5}/README.md +1 -1
- {httpr-0.7.4 → httpr-0.7.5}/pyproject.toml +1 -1
- {httpr-0.7.4 → httpr-0.7.5}/tests/e2e/test_auth.py +5 -5
- {httpr-0.7.4 → httpr-0.7.5}/.github/actions/set-version/action.yml +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/.github/copilot-instructions.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/.github/workflows/benchmark.yml +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/.github/workflows/codspeed.yml +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/.github/workflows/compare.yml +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/.github/workflows/copilot-setup-steps.yml +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/.github/workflows/mkdocs.yml +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/.github/workflows/set_version.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/.gitignore +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/.pre-commit-config.yaml +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/CLAUDE.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/LICENSE +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/Taskfile.yaml +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/benchmark/README.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/benchmark/__init__.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/benchmark/benchmark.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/benchmark/benchmark_cbor.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/benchmark/render_comparison.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/benchmark/server.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/advanced/cookies.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/advanced/index.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/advanced/proxy.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/advanced/ssl-tls.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/api/async-client.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/api/client.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/api/functions.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/api/index.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/api/response.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/benchmark.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/index.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/quickstart.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/tutorial/async.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/tutorial/authentication.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/tutorial/index.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/tutorial/making-requests.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/tutorial/response-handling.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/writings/index.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/docs/writings/posts/2025-02-24-python-http-clients-suck.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/httpr/__init__.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/httpr/httpr.pyi +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/httpr/py.typed +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/mkdocs.yml +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/scripts/generate_certs.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/src/exceptions.rs +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/src/lib.rs +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/src/lifecycle.rs +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/src/params.rs +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/src/response.rs +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/src/timeout.rs +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/src/traits.rs +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/src/utils.rs +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/benchmark/__init__.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/benchmark/codspeed/README.md +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/benchmark/codspeed/__init__.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/benchmark/codspeed/bench_server.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/benchmark/codspeed/conftest.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/benchmark/codspeed/test_decoding.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/benchmark/codspeed/test_transport.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/benchmark/test_performance.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/conftest.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/e2e/__init__.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/e2e/test_async.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/e2e/test_http_version.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/e2e/test_redirects.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/e2e/test_ssl.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/e2e/test_streaming.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/e2e/test_uploads.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/unit/__init__.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/unit/cbor_test_server.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/unit/httpx_conns.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_asyncclient.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_ca_bundle.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_cbor.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_client.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_close.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_defs.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_docs.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_exceptions.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_http_version.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_params.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_proxy.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_response.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_ssl.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_streaming.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_timeout.py +0 -0
- {httpr-0.7.4 → httpr-0.7.5}/uv.lock +0 -0
|
@@ -324,15 +324,22 @@ jobs:
|
|
|
324
324
|
target: x64
|
|
325
325
|
- runner: windows-latest
|
|
326
326
|
target: x86
|
|
327
|
+
python-arch: x86
|
|
328
|
+
- runner: windows-11-arm
|
|
329
|
+
target: aarch64
|
|
327
330
|
steps:
|
|
328
331
|
- uses: actions/checkout@v5
|
|
329
332
|
- uses: actions/setup-python@v6
|
|
333
|
+
id: setup-python
|
|
330
334
|
with:
|
|
331
335
|
python-version: "3.12"
|
|
332
|
-
architecture
|
|
336
|
+
# Empty means the runner's native architecture (x64 / arm64).
|
|
337
|
+
architecture: ${{ matrix.platform.python-arch }}
|
|
333
338
|
- uses: astral-sh/setup-uv@v7
|
|
334
339
|
with:
|
|
335
|
-
|
|
340
|
+
# Pin uv to the interpreter above: given just "3.12", uv may pick an
|
|
341
|
+
# x64 Python on the ARM64 runner and test the wrong wheel under emulation.
|
|
342
|
+
python-version: ${{ steps.setup-python.outputs.python-path }}
|
|
336
343
|
- name: Set version
|
|
337
344
|
uses: ./.github/actions/set-version
|
|
338
345
|
with:
|
|
@@ -354,17 +361,33 @@ jobs:
|
|
|
354
361
|
with:
|
|
355
362
|
name: wheels-windows-${{ matrix.platform.target }}
|
|
356
363
|
path: dist
|
|
364
|
+
- name: Install OpenSSL for cryptography
|
|
365
|
+
# cryptography (pulled in via the trustme dev dependency) ships no
|
|
366
|
+
# win_arm64 wheels yet, so it is built from source against vcpkg's
|
|
367
|
+
# OpenSSL. This step can be removed with their next release as
|
|
368
|
+
# win_arm64 support was merged in pyca/cryptography#15350.
|
|
369
|
+
if: ${{ matrix.platform.target == 'aarch64' }}
|
|
370
|
+
shell: pwsh
|
|
371
|
+
run: |
|
|
372
|
+
& "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install openssl:arm64-windows-static-md
|
|
373
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
374
|
+
"OPENSSL_DIR=$env:VCPKG_INSTALLATION_ROOT\installed\arm64-windows-static-md" >> $env:GITHUB_ENV
|
|
375
|
+
"OPENSSL_STATIC=1" >> $env:GITHUB_ENV
|
|
357
376
|
- name: pytest
|
|
358
377
|
# Skip pytest on x86 - cryptography (pulled in via the trustme dev
|
|
359
378
|
# dependency) no longer ships 32-bit Windows wheels and fails to build
|
|
360
|
-
# from source. The x64
|
|
361
|
-
|
|
379
|
+
# from source. The x64 and aarch64 jobs provide test coverage for
|
|
380
|
+
# Windows.
|
|
381
|
+
if: ${{ matrix.platform.target != 'x86' }}
|
|
362
382
|
shell: bash
|
|
363
383
|
env:
|
|
364
384
|
RUSTC_WRAPPER: ""
|
|
365
385
|
run: |
|
|
366
386
|
set -e
|
|
367
387
|
uv sync --extra dev --find-links dist --reinstall
|
|
388
|
+
if [ "${{ matrix.platform.target }}" = "aarch64" ]; then
|
|
389
|
+
uv run python -c "import platform; m = platform.machine(); assert m == 'ARM64', m"
|
|
390
|
+
fi
|
|
368
391
|
uv run pytest
|
|
369
392
|
|
|
370
393
|
macos:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name = "httpr"
|
|
3
3
|
# Version is set dynamically by CI from git tags (e.g., v1.2.3 -> 1.2.3).
|
|
4
4
|
# Do not edit manually. See .github/actions/set-version/ for details.
|
|
5
|
-
version = "0.7.
|
|
5
|
+
version = "0.7.5"
|
|
6
6
|
edition = "2021"
|
|
7
7
|
description = "Fast HTTP client for python"
|
|
8
8
|
authors = ["thomasht86"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: httpr
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.5
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: 3
|
|
6
6
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
@@ -443,7 +443,7 @@ Provides precompiled wheels for the following platforms:
|
|
|
443
443
|
|
|
444
444
|
- 🐧 linux: `amd64`, `aarch64`, `armv7` (aarch64 and armv7 builds are `manylinux_2_34` compatible. `ubuntu>=22.04`, `debian>=12`)
|
|
445
445
|
- 🐧 musllinux: `amd64`, `aarch64`
|
|
446
|
-
- 🪟 windows: `amd64`
|
|
446
|
+
- 🪟 windows: `amd64`, `arm64`
|
|
447
447
|
- 🍏 macos: `amd64`, `aarch64`.
|
|
448
448
|
|
|
449
449
|
## Development
|
|
@@ -399,7 +399,7 @@ Provides precompiled wheels for the following platforms:
|
|
|
399
399
|
|
|
400
400
|
- 🐧 linux: `amd64`, `aarch64`, `armv7` (aarch64 and armv7 builds are `manylinux_2_34` compatible. `ubuntu>=22.04`, `debian>=12`)
|
|
401
401
|
- 🐧 musllinux: `amd64`, `aarch64`
|
|
402
|
-
- 🪟 windows: `amd64`
|
|
402
|
+
- 🪟 windows: `amd64`, `arm64`
|
|
403
403
|
- 🍏 macos: `amd64`, `aarch64`.
|
|
404
404
|
|
|
405
405
|
## Development
|
|
@@ -11,7 +11,7 @@ keywords = [ "python", "request",]
|
|
|
11
11
|
classifiers = [ "Programming Language :: Rust", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules",]
|
|
12
12
|
# Version is set dynamically by CI from git tags (e.g., v1.2.3 -> 1.2.3).
|
|
13
13
|
# Do not edit manually. See .github/actions/set-version/ for details.
|
|
14
|
-
version = "0.7.
|
|
14
|
+
version = "0.7.5"
|
|
15
15
|
dependencies = []
|
|
16
16
|
[[project.authors]]
|
|
17
17
|
name = "thomasht86"
|
|
@@ -63,17 +63,17 @@ class TestBearerAuth:
|
|
|
63
63
|
assert data["token"] == "my-secret-token"
|
|
64
64
|
|
|
65
65
|
def test_bearer_auth_failure(self, e2e_base_url: str, e2e_ca_cert: str) -> None:
|
|
66
|
-
"""Test bearer auth with wrong token returns
|
|
66
|
+
"""Test bearer auth with wrong token returns 401."""
|
|
67
67
|
client = httpr.Client(ca_cert_file=e2e_ca_cert)
|
|
68
68
|
response = client.get(
|
|
69
69
|
f"{e2e_base_url}/bearer/expected-token",
|
|
70
70
|
auth_bearer="wrong-token",
|
|
71
71
|
)
|
|
72
72
|
|
|
73
|
-
# httpbun returns
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
assert
|
|
73
|
+
# httpbun returns 401 for a wrong token (it returned 200 with
|
|
74
|
+
# authenticated=false before sharat87/httpbun@2d6a28f9)
|
|
75
|
+
assert response.status_code == 401
|
|
76
|
+
assert response.headers["www-authenticate"].startswith("Bearer")
|
|
77
77
|
|
|
78
78
|
def test_bearer_auth_client_level(self, e2e_base_url: str, e2e_ca_cert: str) -> None:
|
|
79
79
|
"""Test bearer auth configured at client level."""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|