Skip to content

Commit 3e55d33

Browse files
authored
upstream header fixes (#1301)
1 parent 7cb07f6 commit 3e55d33

File tree

9 files changed

+17
-24
lines changed

9 files changed

+17
-24
lines changed

.github/workflows/ci-cd.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
tags:
1010
- >-
1111
[0-9]+.[0-9]+.[0-9]+
12+
- >-
13+
[0-9]+.[0-9]+.[0-9]+.dev[0-9]+
1214
pull_request:
1315
branches:
1416
- master

CHANGES.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Changes
22
-------
3+
2.20.1.dev0 (2025-02-24)
4+
^^^^^^^^^^^^^^^^^^^^^^^^
5+
* upstream http response header fixes to be more in-line with botocore
36

47
2.20.0 (2025-02-19)
58
^^^^^^^^^^^^^^^^^^^

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ cov cover coverage: pre-commit
1818

1919
mototest:
2020
python -Wd -X tracemalloc=5 -X faulthandler -m pytest -vv -m "not localonly" -n auto --cov-report term --cov-report html --cov-report xml --cov=aiobotocore --cov=tests --log-cli-level=DEBUG $(FLAGS) aiobotocore tests
21-
@echo "open file://`pwd`/htmlcov/index.html"
2221

2322
clean:
2423
rm -rf `find . -name __pycache__`

aiobotocore/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '2.20.0'
1+
__version__ = '2.20.1.dev0'

aiobotocore/endpoint.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
logger,
1414
)
1515
from botocore.hooks import first_non_none_response
16-
from urllib3.response import HTTPHeaderDict
1716

1817
from aiobotocore.httpchecksum import handle_checksum_body
1918
from aiobotocore.httpsession import AIOHTTPSession
@@ -39,16 +38,7 @@ async def convert_to_response_dict(http_response, operation_model):
3938
4039
"""
4140
response_dict = {
42-
# botocore converts keys to str, so make sure that they are in
43-
# the expected case. See detailed discussion here:
44-
# https://github.com/aio-libs/aiobotocore/pull/116
45-
# aiohttp's CIMultiDict camel cases the headers :(
46-
'headers': HTTPHeaderDict(
47-
{
48-
k.decode('utf-8').lower(): v.decode('utf-8')
49-
for k, v in http_response.raw.raw_headers
50-
}
51-
),
41+
'headers': http_response.headers,
5242
'status_code': http_response.status_code,
5343
'context': {
5444
'operation_name': operation_model.name,

aiobotocore/httpsession.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,17 @@ async def send(self, request):
229229
proxy_headers=proxy_headers,
230230
)
231231

232+
# botocore converts keys to str, so make sure that they are in
233+
# the expected case. See detailed discussion here:
234+
# https://github.com/aio-libs/aiobotocore/pull/116
235+
# aiohttp's CIMultiDict camel cases the headers :(
236+
headers = {
237+
k.decode('utf-8').lower(): v.decode('utf-8')
238+
for k, v in response.raw_headers
239+
}
240+
232241
http_response = aiobotocore.awsrequest.AioAWSResponse(
233-
str(response.url), response.status, response.headers, response
242+
str(response.url), response.status, headers, response
234243
)
235244

236245
if not request.stream_output:

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ dependencies = [
3636
"python-dateutil >= 2.1, < 3.0.0",
3737
"jmespath >= 0.7.1, < 2.0.0",
3838
"multidict >= 6.0.0, < 7.0.0",
39-
"urllib3 >= 1.25.4, < 1.27; python_version < '3.10'",
40-
"urllib3 >= 1.25.4, != 2.2.0, < 3; python_version >= '3.10'",
4139
"wrapt >= 1.10.10, < 2.0.0",
4240
]
4341

tests/test_version.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,6 @@ def test_release_versions():
173173
# rst_ver.is_prerelease
174174
# ), 'Version must be prerelease if final release date not set'
175175
else:
176-
assert (
177-
not rst_ver.is_prerelease
178-
), 'Version must not be prerelease if release date set'
179-
180176
rst_date = datetime.strptime(rst_date, '%Y-%m-%d').date()
181177
rst_prev_date = datetime.strptime(rst_prev_date, '%Y-%m-%d').date()
182178

uv.lock

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)