Skip to content

Commit 5def556

Browse files
authored
Merge pull request #70 from Colin-b/develop
Release 0.19.0
2 parents be26e3e + f82ef80 commit 5def556

File tree

8 files changed

+29
-15
lines changed

8 files changed

+29
-15
lines changed

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: ['3.9', '3.10', '3.11']
14+
python-version: ['3.9', '3.10', '3.11', '3.12']
1515

1616
steps:
1717
- uses: actions/checkout@v4
1818
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v4
19+
uses: actions/setup-python@v5
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222
- name: Install dependencies

.github/workflows/test.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: ['3.9', '3.10', '3.11']
11+
python-version: ['3.9', '3.10', '3.11', '3.12']
1212

1313
steps:
1414
- uses: actions/checkout@v4
1515
- name: Set up Python ${{ matrix.python-version }}
16-
uses: actions/setup-python@v4
16+
uses: actions/setup-python@v5
1717
with:
1818
python-version: ${{ matrix.python-version }}
1919
- name: Install dependencies
@@ -22,4 +22,8 @@ jobs:
2222
python -m pip install .[testing]
2323
- name: Test with pytest
2424
run: |
25-
pytest --cov=httpx_auth --cov-fail-under=100 --cov-report=term-missing
25+
pytest --cov=httpx_auth --cov-fail-under=100 --cov-report=term-missing
26+
- name: Create packages
27+
run: |
28+
python -m pip install build
29+
python -m build .

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 23.3.0
3+
rev: 23.12.1
44
hooks:
55
- id: black

CHANGELOG.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [0.19.0] - 2024-01-09
10+
### Added
11+
- Explicit support for Python 3.12
12+
13+
### Changed
14+
- Requires [`httpx`](https://www.python-httpx.org)==0.26.\*
15+
- Note that this changes the signature sent via AWS auth for URLs containing %. Feel free to open an issue if this is one.
16+
917
## [0.18.0] - 2023-09-11
1018
### Changed
1119
- Requires [`httpx`](https://www.python-httpx.org)==0.25.\*
@@ -185,7 +193,8 @@ Note that a few changes were made:
185193
### Added
186194
- Placeholder for port of requests_auth to httpx
187195

188-
[Unreleased]: https://github.com/Colin-b/httpx_auth/compare/v0.18.0...HEAD
196+
[Unreleased]: https://github.com/Colin-b/httpx_auth/compare/v0.19.0...HEAD
197+
[0.19.0]: https://github.com/Colin-b/httpx_auth/compare/v0.18.0...v0.19.0
189198
[0.18.0]: https://github.com/Colin-b/httpx_auth/compare/v0.17.0...v0.18.0
190199
[0.17.0]: https://github.com/Colin-b/httpx_auth/compare/v0.16.0...v0.17.0
191200
[0.16.0]: https://github.com/Colin-b/httpx_auth/compare/v0.15.0...v0.16.0

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Colin Bounouar
3+
Copyright (c) 2024 Colin Bounouar
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

httpx_auth/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# Major should be incremented in case there is a breaking change. (eg: 2.5.8 -> 3.0.0)
44
# Minor should be incremented in case there is an enhancement. (eg: 2.5.8 -> 2.6.0)
55
# Patch should be incremented in case there is a bug fix. (eg: 2.5.8 -> 2.5.9)
6-
__version__ = "0.18.0"
6+
__version__ = "0.19.0"

pyproject.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ classifiers=[
2626
"Programming Language :: Python :: 3.9",
2727
"Programming Language :: Python :: 3.10",
2828
"Programming Language :: Python :: 3.11",
29+
"Programming Language :: Python :: 3.12",
2930
"Topic :: Software Development :: Build Tools",
3031
]
3132
dependencies = [
32-
"httpx==0.25.*",
33+
"httpx==0.26.*",
3334
]
3435
dynamic = ["version"]
3536

@@ -44,7 +45,7 @@ testing = [
4445
# Used to generate test tokens
4546
"pyjwt==2.*",
4647
# Used to mock httpx
47-
"pytest_httpx==0.25.*",
48+
"pytest_httpx==0.28.*",
4849
# Used to check coverage
4950
"pytest-cov==4.*",
5051
]

tests/test_aws4auth.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def test_aws_auth_path_percent_encode_non_s3(httpx_mock: HTTPXMock, mock_aws_dat
250250
service="iam",
251251
)
252252
httpx_mock.add_response(
253-
url="https://authorized_only/test/%252a%252b%2525/~-_%5E&%20%25%25"
253+
url="https://authorized_only/test/%2a%2b%25/~-_%5E&%20%25%25"
254254
)
255255

256256
httpx.post("https://authorized_only/test/%2a%2b%25/~-_^& %%", auth=auth)
@@ -261,7 +261,7 @@ def test_aws_auth_path_percent_encode_non_s3(httpx_mock: HTTPXMock, mock_aws_dat
261261
)
262262
assert (
263263
headers["Authorization"]
264-
== "AWS4-HMAC-SHA256 Credential=access_id/20181011/us-east-1/iam/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=289c2090b71ada48944fbf204e99cf305effeb54b87932215dc7b2b6a3203722"
264+
== "AWS4-HMAC-SHA256 Credential=access_id/20181011/us-east-1/iam/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=7b3267f1b4bcb1f6731eb99aa9b3381225c18fc32e3ecb78fc4adceb746f92f3"
265265
)
266266
assert headers["x-amz-date"] == "20181011T150505Z"
267267

@@ -274,7 +274,7 @@ def test_aws_auth_path_percent_encode_s3(httpx_mock: HTTPXMock, mock_aws_datetim
274274
service="s3",
275275
)
276276
httpx_mock.add_response(
277-
url="https://authorized_only/test/%252a%252b%2525/~-_%5E&%20%25%25"
277+
url="https://authorized_only/test/%2a%2b%25/~-_%5E&%20%25%25"
278278
)
279279

280280
httpx.post("https://authorized_only/test/%2a%2b%25/~-_^& %%", auth=auth)
@@ -285,7 +285,7 @@ def test_aws_auth_path_percent_encode_s3(httpx_mock: HTTPXMock, mock_aws_datetim
285285
)
286286
assert (
287287
headers["Authorization"]
288-
== "AWS4-HMAC-SHA256 Credential=access_id/20181011/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=2fc7c2f27151e18348862bab0bbe90c4a9f29d7863a33e725d7b1ec96709fdd6"
288+
== "AWS4-HMAC-SHA256 Credential=access_id/20181011/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=dd3e44f87a05d1488fa5aca66702e8c53a0d0fa570564bc70941bc5c6d25016d"
289289
)
290290
assert headers["x-amz-date"] == "20181011T150505Z"
291291

0 commit comments

Comments
 (0)