Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ jobs:
uses: actions/checkout@v7

- name: Initialize CodeQL
uses: github/codeql-action/init@v4.37.7
uses: github/codeql-action/init@v4.37.8
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql.yml
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v4.37.7
uses: github/codeql-action/autobuild@v4.37.8
if: ${{ matrix.language == 'python' || matrix.language == 'javascript' }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4.37.7
uses: github/codeql-action/analyze@v4.37.8
with:
category: "/language:${{ matrix.language }}"
4 changes: 1 addition & 3 deletions requirements/base-ft.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,14 @@ frozenlist==1.8.0
# via
# -r requirements/runtime-deps.in
# aiosignal
gunicorn==26.0.0
gunicorn==26.1.0
# via -r requirements/base-ft.in
idna==3.19
# via yarl
multidict==6.7.1
# via
# -r requirements/runtime-deps.in
# yarl
packaging==26.3
# via gunicorn
propcache==0.5.2
# via
# -r requirements/runtime-deps.in
Expand Down
4 changes: 1 addition & 3 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,14 @@ frozenlist==1.8.0
# via
# -r requirements/runtime-deps.in
# aiosignal
gunicorn==26.0.0
gunicorn==26.1.0
# via -r requirements/base.in
idna==3.19
# via yarl
multidict==6.7.1
# via
# -r requirements/runtime-deps.in
# yarl
packaging==26.3
# via gunicorn
propcache==0.5.2
# via
# -r requirements/runtime-deps.in
Expand Down
5 changes: 2 additions & 3 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ backports-zstd==1.3.0 ; implementation_name == "cpython" and python_version < "3
# via
# -r requirements/lint.in
# -r requirements/runtime-deps.in
blockbuster==1.5.26
blockbuster==1.5.27
# via
# -r requirements/lint.in
# -r requirements/test-common.in
Expand Down Expand Up @@ -100,7 +100,7 @@ frozenlist==1.8.0
# -r requirements/runtime-deps.in
# aiohttp
# aiosignal
gunicorn==26.0.0
gunicorn==26.1.0
# via -r requirements/base.in
identify==2.6.19
# via pre-commit
Expand Down Expand Up @@ -155,7 +155,6 @@ nodeenv==1.10.0
packaging==26.3
# via
# build
# gunicorn
# pytest
# sphinx
# wheel
Expand Down
5 changes: 2 additions & 3 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ backports-zstd==1.3.0 ; platform_python_implementation == "CPython" and python_v
# via
# -r requirements/lint.in
# -r requirements/runtime-deps.in
blockbuster==1.5.26
blockbuster==1.5.27
# via
# -r requirements/lint.in
# -r requirements/test-common.in
Expand Down Expand Up @@ -98,7 +98,7 @@ frozenlist==1.8.0
# -r requirements/runtime-deps.in
# aiohttp
# aiosignal
gunicorn==26.0.0
gunicorn==26.1.0
# via -r requirements/base.in
identify==2.6.19
# via pre-commit
Expand Down Expand Up @@ -152,7 +152,6 @@ nodeenv==1.10.0
packaging==26.3
# via
# build
# gunicorn
# pytest
# sphinx
# wheel
Expand Down
2 changes: 1 addition & 1 deletion requirements/lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ backports-asyncio-runner==1.2.0
# via pytest-asyncio
backports-zstd==1.3.0 ; implementation_name == "cpython" and python_version < "3.14"
# via -r requirements/lint.in
blockbuster==1.5.26
blockbuster==1.5.27
# via -r requirements/lint.in
cffi==2.1.1
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements/test-common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ attrs==26.1.0
# via aiohttp
backports-asyncio-runner==1.2.0
# via pytest-asyncio
blockbuster==1.5.26
blockbuster==1.5.27
# via -r requirements/test-common.in
cffi==2.1.1
# via cryptography
Expand Down
8 changes: 3 additions & 5 deletions requirements/test-ft.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ backports-asyncio-runner==1.2.0
# via pytest-asyncio
backports-zstd==1.3.0 ; platform_python_implementation == "CPython" and python_version < "3.14" and sys_platform != "android" and sys_platform != "ios"
# via -r requirements/runtime-deps.in
blockbuster==1.5.26
blockbuster==1.5.27
# via -r requirements/test-common.in
brotli==1.2.0 ; platform_python_implementation == "CPython" and sys_platform != "android" and sys_platform != "ios"
# via -r requirements/runtime-deps.in
Expand Down Expand Up @@ -59,7 +59,7 @@ frozenlist==1.8.0
# -r requirements/runtime-deps.in
# aiohttp
# aiosignal
gunicorn==26.0.0
gunicorn==26.1.0
# via -r requirements/base-ft.in
idna==3.19
# via
Expand All @@ -85,9 +85,7 @@ mypy==2.1.0 ; implementation_name == "cpython"
mypy-extensions==1.1.0
# via mypy
packaging==26.3
# via
# gunicorn
# pytest
# via pytest
pathspec==1.1.1
# via mypy
pkgconfig==1.6.0
Expand Down
6 changes: 2 additions & 4 deletions requirements/test-mobile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ frozenlist==1.8.0
# -r requirements/runtime-deps.in
# aiohttp
# aiosignal
gunicorn==26.0.0
gunicorn==26.1.0
# via -r requirements/base-ft.in
idna==3.19
# via yarl
Expand All @@ -59,9 +59,7 @@ multidict==6.7.1
# aiohttp
# yarl
packaging==26.3
# via
# gunicorn
# pytest
# via pytest
pkgconfig==1.6.0
# via -r requirements/test-common-base.in
pluggy==1.6.0
Expand Down
8 changes: 3 additions & 5 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ backports-asyncio-runner==1.2.0
# via pytest-asyncio
backports-zstd==1.3.0 ; platform_python_implementation == "CPython" and python_version < "3.14" and sys_platform != "android" and sys_platform != "ios"
# via -r requirements/runtime-deps.in
blockbuster==1.5.26
blockbuster==1.5.27
# via -r requirements/test-common.in
brotli==1.2.0 ; platform_python_implementation == "CPython" and sys_platform != "android" and sys_platform != "ios"
# via -r requirements/runtime-deps.in
Expand Down Expand Up @@ -59,7 +59,7 @@ frozenlist==1.8.0
# -r requirements/runtime-deps.in
# aiohttp
# aiosignal
gunicorn==26.0.0
gunicorn==26.1.0
# via -r requirements/base.in
idna==3.19
# via
Expand All @@ -85,9 +85,7 @@ mypy==2.1.0 ; implementation_name == "cpython"
mypy-extensions==1.1.0
# via mypy
packaging==26.3
# via
# gunicorn
# pytest
# via pytest
pathspec==1.1.1
# via mypy
pkgconfig==1.6.0
Expand Down
20 changes: 17 additions & 3 deletions tests/test_web_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -2450,7 +2450,9 @@ async def handler(request: web.Request) -> NoReturn:
assert resp.status == 413


@pytest.mark.skipif(not os.path.isdir("/dev/fd"), reason="needs /dev/fd to count fds")
@pytest.mark.skipif(
not os.path.isdir("/proc/self/fd"), reason="needs /proc/self/fd to identify fds"
)
@pytest.mark.parametrize(
("parts", "part_body", "expected_fds"),
(
Expand All @@ -2464,10 +2466,22 @@ async def test_post_file_fields_descriptor_cost(
) -> None:
"""Only a part past the spool size may cost a descriptor."""

def deleted_file_fds() -> set[tuple[str, str]]:
"""(fd, symlink target) pairs for open fds backed by deleted files."""
fds = set()
for name in os.listdir("/proc/self/fd"):
try:
target = os.readlink(f"/proc/self/fd/{name}")
except OSError:
continue # closed between listdir and readlink
if target.endswith("(deleted)"):
fds.add((name, target))
return fds

async def handler(request: web.Request) -> web.Response:
before = set(await asyncio.to_thread(os.listdir, "/dev/fd"))
before = await asyncio.to_thread(deleted_file_fds)
data = await request.post()
after = set(await asyncio.to_thread(os.listdir, "/dev/fd"))
after = await asyncio.to_thread(deleted_file_fds)
assert len(data) == parts
return web.Response(text=str(len(after - before)))

Expand Down
Loading