Skip to content

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented May 19, 2025

What do these changes do?

Overview

This commit fixes compilation issues with Cython 3.1.1 for the 3.12 branch.

Changes Made

1. Updated Cython Version

  • Upgraded from Cython 3.0.12 to 3.1.1 in:
    • requirements/cython.txt
    • requirements/constraints.txt

2. Fixed Type Annotation

  • Modified aiohttp/_websocket/reader_py.py:
    • Changed exc: "BaseException" to exc: BaseException
    • Removed quotes around BaseException type annotation to comply with Cython 3.1.1

Purpose

This is a compatibility fix to ensure the project can compile successfully with the newer version of Cython 3.1.1.

Are there changes in behavior for the user?

no

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

no

replaces and closes #10849

@bdraco bdraco changed the title [3.12] Fix compile with Cython 3.1.1 [3.12] Updates for Cython 3.1.1 May 19, 2025
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label May 19, 2025
Copy link

codecov bot commented May 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (3.12@cfe4269). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             3.12   #10877   +/-   ##
=======================================
  Coverage        ?   98.09%           
=======================================
  Files           ?      126           
  Lines           ?    38057           
  Branches        ?     2148           
=======================================
  Hits            ?    37333           
  Misses          ?      553           
  Partials        ?      171           
Flag Coverage Δ
CI-GHA 97.98% <ø> (?)
OS-Linux 97.70% <ø> (?)
OS-Windows 95.11% <ø> (?)
OS-macOS 96.84% <ø> (?)
Py-3.10.11 96.72% <ø> (?)
Py-3.10.17 97.28% <ø> (?)
Py-3.11.12 97.35% <ø> (?)
Py-3.11.9 96.82% <ø> (?)
Py-3.12.10 97.77% <ø> (?)
Py-3.13.3 97.76% <ø> (?)
Py-3.9.13 96.61% <ø> (?)
Py-3.9.22 97.13% <ø> (?)
Py-pypy7.3.16 84.06% <ø> (?)
VM-macos 96.84% <ø> (?)
VM-ubuntu 97.70% <ø> (?)
VM-windows 95.11% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bdraco bdraco marked this pull request as ready for review May 19, 2025 12:55
@bdraco bdraco requested review from asvetlov and webknjaz as code owners May 19, 2025 12:55
@bdraco bdraco enabled auto-merge (squash) May 19, 2025 12:59
@bdraco bdraco changed the title [3.12] Updates for Cython 3.1.1 [3.12] Updates to Cython 3.1.1 May 19, 2025
@bdraco bdraco changed the title [3.12] Updates to Cython 3.1.1 [3.12] Update to Cython 3.1.1 May 19, 2025
Copy link

codspeed-hq bot commented May 19, 2025

CodSpeed Performance Report

Merging #10877 will not alter performance

Comparing cython_311 (6b94c5d) with 3.12 (5f0902b)

Summary

✅ 60 untouched benchmarks

@bdraco bdraco merged commit 6ea542e into 3.12 May 19, 2025
34 checks passed
@bdraco bdraco deleted the cython_311 branch May 19, 2025 13:02
Copy link
Contributor

patchback bot commented May 19, 2025

Backport to 3.11: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply 6ea542e on top of patchback/backports/3.11/6ea542ef4b78174b2b9c39146fc6f72abeaba2ce/pr-10877

Backporting merged PR #10877 into 3.12

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/aio-libs/aiohttp.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/3.11/6ea542ef4b78174b2b9c39146fc6f72abeaba2ce/pr-10877 upstream/3.11
  4. Now, cherry-pick PR [3.12] Update to Cython 3.1.1 #10877 contents into that branch:
    $ git cherry-pick -x 6ea542ef4b78174b2b9c39146fc6f72abeaba2ce
    If it'll yell at you with something like fatal: Commit 6ea542ef4b78174b2b9c39146fc6f72abeaba2ce is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x 6ea542ef4b78174b2b9c39146fc6f72abeaba2ce
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR [3.12] Update to Cython 3.1.1 #10877 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/3.11/6ea542ef4b78174b2b9c39146fc6f72abeaba2ce/pr-10877
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

bdraco added a commit that referenced this pull request May 19, 2025
closes #10849

(cherry picked from commit 6ea542e)
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.

1 participant