Skip to content

[PR #12629/66cc7b68 backport][3.13] Install Python via astral-sh/setup-uv in test/autobahn jobs#12638

Closed
bdraco wants to merge 2 commits into
aio-libs:3.13from
bdraco:patchback/backports/3.13/66cc7b68aad1ca084d210a466d4970de9619f10e/pr-12629
Closed

[PR #12629/66cc7b68 backport][3.13] Install Python via astral-sh/setup-uv in test/autobahn jobs#12638
bdraco wants to merge 2 commits into
aio-libs:3.13from
bdraco:patchback/backports/3.13/66cc7b68aad1ca084d210a466d4970de9619f10e/pr-12629

Conversation

@bdraco

@bdraco bdraco commented May 18, 2026

Copy link
Copy Markdown
Member

This is a backport of PR #12629 as merged into master (66cc7b6).

What do these changes do?

Swap actions/setup-python@v6 for astral-sh/setup-uv@v8.1.0 in
the two CI matrix jobs that install a Python interpreter — test
and autobahn. activate-environment: true keeps python/pip
on PATH so the subsequent uv pip install ... invocations target
the seeded venv. enable-cache: true subsumes the previous
actions/cache pip-cache step, which is dropped.

Are there changes in behavior for the user?

No. This only affects CI runner provisioning. End-user-visible
behavior of aiohttp is unaffected.

The Codecov flag derived from
steps.python-install.outputs.python-version now reports the
matrix spec (3.14t) rather than the resolved patch
(3.14.5t); coarser, but easier to group across patch releases.

Is it a substantial burden for the maintainers to support this?

No. astral-sh/setup-uv is widely used across aio-libs and the
broader Python ecosystem; activate-environment: true reproduces
the behavior the existing pipeline already relies on, so the swap
is local to the action invocation.

This mirrors aio-libs/yarl#1704, which made the same swap.

Related issue number

N/A.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist — N/A (CI configuration)
  • Documentation reflects the changes — N/A (no user-visible change)
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt — already listed
  • Add a new news fragment into the CHANGES/ folder — to be added in a follow-up commit once the PR number is assigned
Agent run details (optional, for reviewers)

actions/setup-python downloads non-cached interpreter variants
from its release index, which takes ~40s on macos-latest and ~58s
on windows-latest for 3.14t (the free-threaded build is not in
the hosted-tool-cache). astral-sh/setup-uv pulls
python-build-standalone from a CDN, which is a few seconds across
all three OSes. Motivation transferred from the yarl PR's own
measurements.

Drafted with Claude Code (Opus 4.7); reviewed by @bdraco.

@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided There is a change note present in this PR label May 18, 2026
@codecov

codecov Bot commented May 18, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
4383 1 4382 81
View the top 1 failed test(s) by shortest run time
tests.test_web_urldispatcher::test_access_symlink_loop[pyloop]
Stack Traces | 0.206s run time
tmp_path = WindowsPath('C:.../pytest-0/popen-gw2/test_access_symlink_loop_pyloo0')
aiohttp_client = <function aiohttp_client.<locals>.go at 0x000001EC6CF8A9D0>

    #x1B[0m#x1B[94masync#x1B[39;49;00m #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_access_symlink_loop#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        tmp_path: pathlib.Path, aiohttp_client: AiohttpClient#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        #x1B[90m# Tests the access to a looped symlink, which could not be resolved.#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        my_dir_path = tmp_path / #x1B[33m"#x1B[39;49;00m#x1B[33mmy_symlink#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        pathlib.Path(#x1B[96mstr#x1B[39;49;00m(my_dir_path)).symlink_to(#x1B[96mstr#x1B[39;49;00m(my_dir_path), #x1B[94mTrue#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        app = web.Application()#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[90m# Register global static route:#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        app.router.add_static(#x1B[33m"#x1B[39;49;00m#x1B[33m/#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[96mstr#x1B[39;49;00m(tmp_path), show_index=#x1B[94mTrue#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        client = #x1B[94mawait#x1B[39;49;00m aiohttp_client(app)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[90m# Request the root of the static directory.#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        r = #x1B[94mawait#x1B[39;49;00m client.get(#x1B[33m"#x1B[39;49;00m#x1B[33m/#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m + my_dir_path.name)#x1B[90m#x1B[39;49;00m
>       #x1B[94massert#x1B[39;49;00m r.status == #x1B[94m404#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE       AssertionError: assert 500 == 404#x1B[0m
#x1B[1m#x1B[31mE        +  where 500 = <ClientResponse(http://127.0.0.1:51758/my_symlink) [500 Internal Server Error]>\n<CIMultiDictProxy('Content-Type': 'text/plain; charset=utf-8', 'Content-Length': '55', 'Date': 'Tue, 19 May 2026 18:08:48 GMT', 'Server': 'Python/3.9 aiohttp/3.13.5.dev0', 'Connection': 'close')>\n.status#x1B[0m

aiohttp_client = <function aiohttp_client.<locals>.go at 0x000001EC6CF8A9D0>
app        = <Application 0x1ec6cf66fa0>
client     = <aiohttp.test_utils.TestClient object at 0x000001EC6CF66190>
my_dir_path = WindowsPath('C:.../pytest-0/popen-gw2/test_access_symlink_loop_pyloo0/my_symlink')
r          = <ClientResponse(http://127.0.0.1:51758/my_symlink) [500 Internal Server Error]>
<CIMultiDictProxy('Content-Type': 'tex...h': '55', 'Date': 'Tue, 19 May 2026 18:08:48 GMT', 'Server': 'Python/3.9 aiohttp/3.13.5.dev0', 'Connection': 'close')>

tmp_path   = WindowsPath('C:.../pytest-0/popen-gw2/test_access_symlink_loop_pyloo0')

#x1B[1m#x1B[31mtests\test_web_urldispatcher.py#x1B[0m:540: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@bdraco
bdraco marked this pull request as ready for review May 18, 2026 22:45
@bdraco
bdraco requested review from asvetlov and webknjaz as code owners May 18, 2026 22:45
@bdraco
bdraco enabled auto-merge (squash) May 18, 2026 22:45
@codspeed-hq

codspeed-hq Bot commented May 18, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 66 untouched benchmarks


Comparing bdraco:patchback/backports/3.13/66cc7b68aad1ca084d210a466d4970de9619f10e/pr-12629 (dd8b34b) with 3.13 (4ec3ac3)

Open in CodSpeed

@bdraco
bdraco marked this pull request as draft May 18, 2026 23:00
auto-merge was automatically disabled May 18, 2026 23:00

Pull request was converted to draft

@bdraco

bdraco commented May 18, 2026

Copy link
Copy Markdown
Member Author

need to dig in to the test failure more.

@Dreamsorcerer

Copy link
Copy Markdown
Member

Don't need 3.13 backport anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants