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.
Files changed (93) hide show
  1. {httpr-0.7.4 → httpr-0.7.5}/.github/workflows/CI.yml +27 -4
  2. {httpr-0.7.4 → httpr-0.7.5}/Cargo.lock +1 -1
  3. {httpr-0.7.4 → httpr-0.7.5}/Cargo.toml +1 -1
  4. {httpr-0.7.4 → httpr-0.7.5}/PKG-INFO +2 -2
  5. {httpr-0.7.4 → httpr-0.7.5}/README.md +1 -1
  6. {httpr-0.7.4 → httpr-0.7.5}/pyproject.toml +1 -1
  7. {httpr-0.7.4 → httpr-0.7.5}/tests/e2e/test_auth.py +5 -5
  8. {httpr-0.7.4 → httpr-0.7.5}/.github/actions/set-version/action.yml +0 -0
  9. {httpr-0.7.4 → httpr-0.7.5}/.github/copilot-instructions.md +0 -0
  10. {httpr-0.7.4 → httpr-0.7.5}/.github/workflows/benchmark.yml +0 -0
  11. {httpr-0.7.4 → httpr-0.7.5}/.github/workflows/codspeed.yml +0 -0
  12. {httpr-0.7.4 → httpr-0.7.5}/.github/workflows/compare.yml +0 -0
  13. {httpr-0.7.4 → httpr-0.7.5}/.github/workflows/copilot-setup-steps.yml +0 -0
  14. {httpr-0.7.4 → httpr-0.7.5}/.github/workflows/mkdocs.yml +0 -0
  15. {httpr-0.7.4 → httpr-0.7.5}/.github/workflows/set_version.py +0 -0
  16. {httpr-0.7.4 → httpr-0.7.5}/.gitignore +0 -0
  17. {httpr-0.7.4 → httpr-0.7.5}/.pre-commit-config.yaml +0 -0
  18. {httpr-0.7.4 → httpr-0.7.5}/CLAUDE.md +0 -0
  19. {httpr-0.7.4 → httpr-0.7.5}/LICENSE +0 -0
  20. {httpr-0.7.4 → httpr-0.7.5}/Taskfile.yaml +0 -0
  21. {httpr-0.7.4 → httpr-0.7.5}/benchmark/README.md +0 -0
  22. {httpr-0.7.4 → httpr-0.7.5}/benchmark/__init__.py +0 -0
  23. {httpr-0.7.4 → httpr-0.7.5}/benchmark/benchmark.py +0 -0
  24. {httpr-0.7.4 → httpr-0.7.5}/benchmark/benchmark_cbor.py +0 -0
  25. {httpr-0.7.4 → httpr-0.7.5}/benchmark/render_comparison.py +0 -0
  26. {httpr-0.7.4 → httpr-0.7.5}/benchmark/server.py +0 -0
  27. {httpr-0.7.4 → httpr-0.7.5}/docs/advanced/cookies.md +0 -0
  28. {httpr-0.7.4 → httpr-0.7.5}/docs/advanced/index.md +0 -0
  29. {httpr-0.7.4 → httpr-0.7.5}/docs/advanced/proxy.md +0 -0
  30. {httpr-0.7.4 → httpr-0.7.5}/docs/advanced/ssl-tls.md +0 -0
  31. {httpr-0.7.4 → httpr-0.7.5}/docs/api/async-client.md +0 -0
  32. {httpr-0.7.4 → httpr-0.7.5}/docs/api/client.md +0 -0
  33. {httpr-0.7.4 → httpr-0.7.5}/docs/api/functions.md +0 -0
  34. {httpr-0.7.4 → httpr-0.7.5}/docs/api/index.md +0 -0
  35. {httpr-0.7.4 → httpr-0.7.5}/docs/api/response.md +0 -0
  36. {httpr-0.7.4 → httpr-0.7.5}/docs/benchmark.md +0 -0
  37. {httpr-0.7.4 → httpr-0.7.5}/docs/index.md +0 -0
  38. {httpr-0.7.4 → httpr-0.7.5}/docs/quickstart.md +0 -0
  39. {httpr-0.7.4 → httpr-0.7.5}/docs/tutorial/async.md +0 -0
  40. {httpr-0.7.4 → httpr-0.7.5}/docs/tutorial/authentication.md +0 -0
  41. {httpr-0.7.4 → httpr-0.7.5}/docs/tutorial/index.md +0 -0
  42. {httpr-0.7.4 → httpr-0.7.5}/docs/tutorial/making-requests.md +0 -0
  43. {httpr-0.7.4 → httpr-0.7.5}/docs/tutorial/response-handling.md +0 -0
  44. {httpr-0.7.4 → httpr-0.7.5}/docs/writings/index.md +0 -0
  45. {httpr-0.7.4 → httpr-0.7.5}/docs/writings/posts/2025-02-24-python-http-clients-suck.md +0 -0
  46. {httpr-0.7.4 → httpr-0.7.5}/httpr/__init__.py +0 -0
  47. {httpr-0.7.4 → httpr-0.7.5}/httpr/httpr.pyi +0 -0
  48. {httpr-0.7.4 → httpr-0.7.5}/httpr/py.typed +0 -0
  49. {httpr-0.7.4 → httpr-0.7.5}/mkdocs.yml +0 -0
  50. {httpr-0.7.4 → httpr-0.7.5}/scripts/generate_certs.py +0 -0
  51. {httpr-0.7.4 → httpr-0.7.5}/src/exceptions.rs +0 -0
  52. {httpr-0.7.4 → httpr-0.7.5}/src/lib.rs +0 -0
  53. {httpr-0.7.4 → httpr-0.7.5}/src/lifecycle.rs +0 -0
  54. {httpr-0.7.4 → httpr-0.7.5}/src/params.rs +0 -0
  55. {httpr-0.7.4 → httpr-0.7.5}/src/response.rs +0 -0
  56. {httpr-0.7.4 → httpr-0.7.5}/src/timeout.rs +0 -0
  57. {httpr-0.7.4 → httpr-0.7.5}/src/traits.rs +0 -0
  58. {httpr-0.7.4 → httpr-0.7.5}/src/utils.rs +0 -0
  59. {httpr-0.7.4 → httpr-0.7.5}/tests/benchmark/__init__.py +0 -0
  60. {httpr-0.7.4 → httpr-0.7.5}/tests/benchmark/codspeed/README.md +0 -0
  61. {httpr-0.7.4 → httpr-0.7.5}/tests/benchmark/codspeed/__init__.py +0 -0
  62. {httpr-0.7.4 → httpr-0.7.5}/tests/benchmark/codspeed/bench_server.py +0 -0
  63. {httpr-0.7.4 → httpr-0.7.5}/tests/benchmark/codspeed/conftest.py +0 -0
  64. {httpr-0.7.4 → httpr-0.7.5}/tests/benchmark/codspeed/test_decoding.py +0 -0
  65. {httpr-0.7.4 → httpr-0.7.5}/tests/benchmark/codspeed/test_transport.py +0 -0
  66. {httpr-0.7.4 → httpr-0.7.5}/tests/benchmark/test_performance.py +0 -0
  67. {httpr-0.7.4 → httpr-0.7.5}/tests/conftest.py +0 -0
  68. {httpr-0.7.4 → httpr-0.7.5}/tests/e2e/__init__.py +0 -0
  69. {httpr-0.7.4 → httpr-0.7.5}/tests/e2e/test_async.py +0 -0
  70. {httpr-0.7.4 → httpr-0.7.5}/tests/e2e/test_http_version.py +0 -0
  71. {httpr-0.7.4 → httpr-0.7.5}/tests/e2e/test_redirects.py +0 -0
  72. {httpr-0.7.4 → httpr-0.7.5}/tests/e2e/test_ssl.py +0 -0
  73. {httpr-0.7.4 → httpr-0.7.5}/tests/e2e/test_streaming.py +0 -0
  74. {httpr-0.7.4 → httpr-0.7.5}/tests/e2e/test_uploads.py +0 -0
  75. {httpr-0.7.4 → httpr-0.7.5}/tests/unit/__init__.py +0 -0
  76. {httpr-0.7.4 → httpr-0.7.5}/tests/unit/cbor_test_server.py +0 -0
  77. {httpr-0.7.4 → httpr-0.7.5}/tests/unit/httpx_conns.py +0 -0
  78. {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_asyncclient.py +0 -0
  79. {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_ca_bundle.py +0 -0
  80. {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_cbor.py +0 -0
  81. {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_client.py +0 -0
  82. {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_close.py +0 -0
  83. {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_defs.py +0 -0
  84. {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_docs.py +0 -0
  85. {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_exceptions.py +0 -0
  86. {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_http_version.py +0 -0
  87. {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_params.py +0 -0
  88. {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_proxy.py +0 -0
  89. {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_response.py +0 -0
  90. {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_ssl.py +0 -0
  91. {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_streaming.py +0 -0
  92. {httpr-0.7.4 → httpr-0.7.5}/tests/unit/test_timeout.py +0 -0
  93. {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: ${{ matrix.platform.target }}
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
- python-version: "3.12"
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 job provides test coverage for Windows.
361
- if: ${{ matrix.platform.target == 'x64' }}
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:
@@ -516,7 +516,7 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
516
516
 
517
517
  [[package]]
518
518
  name = "httpr"
519
- version = "0.7.4"
519
+ version = "0.7.5"
520
520
  dependencies = [
521
521
  "anyhow",
522
522
  "bytes",
@@ -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.4"
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.4
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.4"
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 authenticated=false."""
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 200 with authenticated=false for wrong tokens
74
- assert response.status_code == 200
75
- data = response.json()
76
- assert data["authenticated"] is False
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