Skip to content

Commit 48f7aa4

Browse files
Merge branch 'master' into remove-pickle-loading
2 parents 9b52d5c + 3f30561 commit 48f7aa4

111 files changed

Lines changed: 1706 additions & 555 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codecov.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
codecov:
22
branch: master
33
notify:
4-
after_n_builds: 13
4+
manual_trigger: true
5+
6+
comment:
7+
require_head: false
8+
require_base: false
59

610
coverage:
711
range: "95..100"
812

913
status:
1014
project: no
1115

16+
component_management:
17+
individual_components:
18+
- component_id: project
19+
paths:
20+
- aiohttp/**
21+
- component_id: tests
22+
paths:
23+
- tests/**
24+
1225
flags:
1326
library:
1427
paths:

.coveragerc.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ exclude_also = [
1919
'assert False',
2020
': \.\.\.(\s*#.*)?$',
2121
'^ +\.\.\.$',
22+
'pytest.fail\('
2223
]

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,18 @@ updates:
4141
schedule:
4242
interval: "daily"
4343
open-pull-requests-limit: 10
44+
45+
- package-ecosystem: "docker"
46+
directory: "/tests/autobahn/"
47+
labels:
48+
- dependencies
49+
schedule:
50+
interval: "monthly"
51+
52+
- package-ecosystem: "docker"
53+
directory: "/tests/autobahn/"
54+
labels:
55+
- dependencies
56+
target-branch: "3.14"
57+
schedule:
58+
interval: "monthly"

.github/workflows/ci-cd.yml

Lines changed: 111 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
with:
7575
python-version: 3.11
7676
- name: Cache PyPI
77-
uses: actions/[email protected].3
77+
uses: actions/[email protected].4
7878
with:
7979
key: pip-lint-${{ hashFiles('requirements/*.txt') }}
8080
path: ~/.cache/pip
@@ -132,7 +132,7 @@ jobs:
132132
with:
133133
submodules: true
134134
- name: Cache llhttp generated files
135-
uses: actions/[email protected].3
135+
uses: actions/[email protected].4
136136
id: cache
137137
with:
138138
key: llhttp-${{ hashFiles('vendor/llhttp/package*.json', 'vendor/llhttp/src/**/*') }}
@@ -199,7 +199,7 @@ jobs:
199199
echo "dir=$(pip cache dir)" >> "${GITHUB_OUTPUT}"
200200
shell: bash
201201
- name: Cache PyPI
202-
uses: actions/[email protected].3
202+
uses: actions/[email protected].4
203203
with:
204204
key: pip-ci-${{ runner.os }}-${{ matrix.pyver }}-${{ matrix.no-extensions }}-${{ hashFiles('requirements/*.txt') }}
205205
path: ${{ steps.pip-cache.outputs.dir }}
@@ -218,7 +218,7 @@ jobs:
218218
run: echo "PYTHON_GIL=0" >> $GITHUB_ENV
219219
- name: Restore llhttp generated files
220220
if: ${{ matrix.no-extensions == '' }}
221-
uses: actions/download-artifact@v7
221+
uses: actions/download-artifact@v8
222222
with:
223223
name: llhttp
224224
path: vendor/llhttp/build/
@@ -237,7 +237,7 @@ jobs:
237237
PIP_USER: 1
238238
run: >-
239239
PATH="${HOME}/Library/Python/3.11/bin:${HOME}/.local/bin:${PATH}"
240-
pytest --junitxml=junit.xml
240+
pytest --junitxml=junit.xml -m 'not dev_mode and not autobahn'
241241
shell: bash
242242
- name: Re-run the failing tests with maximum verbosity
243243
if: failure()
@@ -264,7 +264,99 @@ jobs:
264264
- name: Upload coverage
265265
uses: codecov/codecov-action@v5
266266
with:
267-
file: ./coverage.xml
267+
files: ./coverage.xml
268+
flags: >-
269+
CI-GHA,OS-${{
270+
runner.os
271+
}},VM-${{
272+
matrix.os
273+
}},Py-${{
274+
steps.python-install.outputs.python-version
275+
}}
276+
token: ${{ secrets.CODECOV_TOKEN }}
277+
- name: Upload test results to Codecov
278+
if: ${{ !cancelled() }}
279+
uses: codecov/test-results-action@v1
280+
with:
281+
token: ${{ secrets.CODECOV_TOKEN }}
282+
283+
autobahn:
284+
permissions:
285+
contents: read # to fetch code (actions/checkout)
286+
287+
name: Autobahn testsuite
288+
needs: gen_llhttp
289+
strategy:
290+
matrix:
291+
pyver: ['3.14']
292+
no-extensions: ['']
293+
os: [ubuntu]
294+
fail-fast: true
295+
runs-on: ${{ matrix.os }}-latest
296+
steps:
297+
- name: Checkout
298+
uses: actions/checkout@v6
299+
with:
300+
submodules: true
301+
- name: Setup Python ${{ matrix.pyver }}
302+
id: python-install
303+
uses: actions/setup-python@v6
304+
with:
305+
allow-prereleases: true
306+
python-version: ${{ matrix.pyver }}
307+
- name: Get pip cache dir
308+
id: pip-cache
309+
run: |
310+
echo "dir=$(pip cache dir)" >> "${GITHUB_OUTPUT}"
311+
shell: bash
312+
- name: Cache PyPI
313+
uses: actions/[email protected]
314+
with:
315+
key: pip-ci-${{ runner.os }}-${{ matrix.pyver }}-${{ matrix.no-extensions }}-${{ hashFiles('requirements/*.txt') }}
316+
path: ${{ steps.pip-cache.outputs.dir }}
317+
restore-keys: |
318+
pip-ci-${{ runner.os }}-${{ matrix.pyver }}-${{ matrix.no-extensions }}-
319+
- name: Update pip, wheel, setuptools, build, twine
320+
run: |
321+
python -m pip install -U pip wheel setuptools build twine
322+
- name: Install dependencies
323+
env:
324+
DEPENDENCY_GROUP: test${{ endsWith(matrix.pyver, 't') && '-ft' || '' }}
325+
run: |
326+
python -Im pip install -r requirements/${{ env.DEPENDENCY_GROUP }}.in -c requirements/${{ env.DEPENDENCY_GROUP }}.txt
327+
- name: Restore llhttp generated files
328+
if: ${{ matrix.no-extensions == '' }}
329+
uses: actions/download-artifact@v8
330+
with:
331+
name: llhttp
332+
path: vendor/llhttp/build/
333+
- name: Cythonize
334+
if: ${{ matrix.no-extensions == '' }}
335+
run: |
336+
make cythonize
337+
- name: Install self
338+
env:
339+
AIOHTTP_NO_EXTENSIONS: ${{ matrix.no-extensions }}
340+
run: python -m pip install -e .
341+
- name: Run unittests
342+
env:
343+
COLOR: yes
344+
AIOHTTP_NO_EXTENSIONS: ${{ matrix.no-extensions }}
345+
PIP_USER: 1
346+
run: >-
347+
PATH="${HOME}/Library/Python/3.11/bin:${HOME}/.local/bin:${PATH}"
348+
pytest --junitxml=junit.xml --numprocesses=0 -m autobahn
349+
shell: bash
350+
- name: Turn coverage into xml
351+
env:
352+
COLOR: 'yes'
353+
PIP_USER: 1
354+
run: |
355+
python -m coverage xml
356+
- name: Upload coverage
357+
uses: codecov/codecov-action@v5
358+
with:
359+
files: ./coverage.xml
268360
flags: >-
269361
CI-GHA,OS-${{
270362
runner.os
@@ -308,7 +400,7 @@ jobs:
308400
run: |
309401
python -m pip install -r requirements/test.in -c requirements/test.txt
310402
- name: Restore llhttp generated files
311-
uses: actions/download-artifact@v7
403+
uses: actions/download-artifact@v8
312404
with:
313405
name: llhttp
314406
path: vendor/llhttp/build/
@@ -330,6 +422,7 @@ jobs:
330422
needs:
331423
- lint
332424
- test
425+
- autobahn
333426

334427
runs-on: ubuntu-latest
335428

@@ -338,6 +431,12 @@ jobs:
338431
uses: re-actors/alls-green@release/v1
339432
with:
340433
jobs: ${{ toJSON(needs) }}
434+
- name: Trigger codecov notification
435+
uses: codecov/codecov-action@v5
436+
with:
437+
token: ${{ secrets.CODECOV_TOKEN }}
438+
fail_ci_if_error: true
439+
run_command: send-notifications
341440

342441
pre-deploy:
343442
name: Pre-Deploy
@@ -373,7 +472,7 @@ jobs:
373472
python -m
374473
pip install -r requirements/cython.in -c requirements/cython.txt
375474
- name: Restore llhttp generated files
376-
uses: actions/download-artifact@v7
475+
uses: actions/download-artifact@v8
377476
with:
378477
name: llhttp
379478
path: vendor/llhttp/build/
@@ -438,7 +537,7 @@ jobs:
438537
submodules: true
439538
- name: Set up QEMU
440539
if: ${{ matrix.qemu }}
441-
uses: docker/setup-qemu-action@v3
540+
uses: docker/setup-qemu-action@v4
442541
with:
443542
platforms: all
444543
# This should be temporary
@@ -466,15 +565,15 @@ jobs:
466565
python -m
467566
pip install -r requirements/cython.in -c requirements/cython.txt
468567
- name: Restore llhttp generated files
469-
uses: actions/download-artifact@v7
568+
uses: actions/download-artifact@v8
470569
with:
471570
name: llhttp
472571
path: vendor/llhttp/build/
473572
- name: Cythonize
474573
run: |
475574
make cythonize
476575
- name: Build wheels
477-
uses: pypa/cibuildwheel@v3.3.1
576+
uses: pypa/cibuildwheel@v3.4.0
478577
env:
479578
CIBW_SKIP: pp* ${{ matrix.musl == 'musllinux' && '*manylinux*' || '*musllinux*' }}
480579
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
@@ -516,7 +615,7 @@ jobs:
516615
run: |
517616
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
518617
- name: Download distributions
519-
uses: actions/download-artifact@v7
618+
uses: actions/download-artifact@v8
520619
with:
521620
path: dist
522621
pattern: dist-*

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ repos:
6060
- flake8-no-implicit-concat==0.3.4
6161
- flake8-requirements==1.7.8
6262
- repo: https://github.com/PyCQA/isort
63-
rev: '7.0.0'
63+
rev: '8.0.1'
6464
hooks:
6565
- id: isort
6666
- repo: https://github.com/psf/black-pre-commit-mirror
67-
rev: '25.9.0'
67+
rev: '26.3.1'
6868
hooks:
6969
- id: black
7070
language_version: python3 # Should be a command that runs python
@@ -99,7 +99,7 @@ repos:
9999
- id: detect-private-key
100100
exclude: ^examples/
101101
- repo: https://github.com/asottile/pyupgrade
102-
rev: 'v3.21.0'
102+
rev: 'v3.21.2'
103103
hooks:
104104
- id: pyupgrade
105105
args: ['--py37-plus']
@@ -121,7 +121,7 @@ repos:
121121
exclude: >-
122122
^CHANGES\.rst$
123123
- repo: https://github.com/codespell-project/codespell
124-
rev: v2.4.1
124+
rev: v2.4.2
125125
hooks:
126126
- id: codespell
127127
additional_dependencies:

CHANGES/10596.bugfix.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Fixed server hanging indefinitely when chunked transfer encoding chunk-size
2+
does not match actual data length. The server now raises
3+
``TransferEncodingError`` instead of waiting forever for data that will
4+
never arrive -- by :user:`Fridayai700`.

CHANGES/10611.bugfix.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Reject HTTP requests with duplicate ``chunked`` Transfer-Encoding
2+
(e.g. ``Transfer-Encoding: chunked, chunked``) with a
3+
``BadHttpMessage`` error, per :rfc:`9112` section 7.1 -- by :user:`worksbyfriday`.

CHANGES/10665.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added :py:attr:`~aiohttp.web.TCPSite.port` accessor for dynamic port allocations in :class:`~aiohttp.web.TCPSite` -- by :user:`twhittock-disguise` and :user:`rodrigobnogueira`.

CHANGES/10683.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed misleading TLS-in-TLS warning being emitted when sending HTTPS requests through an HTTP proxy. The warning now only fires when the proxy itself uses HTTPS, which is the only case where TLS-in-TLS actually applies -- by :user:`wavebyrd`.

CHANGES/10753.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Widened ``trace_request_ctx`` parameter type from ``Mapping[str, Any] | None`` to ``object`` to allow passing instances of user-defined classes as trace context -- by :user:`nightcityblade`.

0 commit comments

Comments
 (0)