Build the websocket reader_c extension without the reader_c.py symlink by bdraco · Pull Request #13457 · aio-libs/aiohttp · GitHub
Skip to content

Build the websocket reader_c extension without the reader_c.py symlink - #13457

Merged
Dreamsorcerer merged 3 commits into
masterfrom
drop-reader-c-symlink
Aug 17, 2026
Merged

Dreamsorcerer merged 3 commits into
masterfrom
drop-reader-c-symlink

Conversation

@bdraco

@bdraco bdraco commented Aug 17, 2026

Copy link
Copy Markdown
Member

What do these changes do?

Removes the aiohttp/_websocket/reader_c.py symlink; the extension is now compiled directly from reader_py.py using cython --module-name aiohttp._websocket.reader_c. The symlink only existed so Cython would pair the source with reader_c.pxd and emit the right module name, but after #13388 the wheel build materializes it as a regular file in site-packages, which coverage then reports as a new 0% file.

Are there changes in behavior for the user?

No runtime changes; dists no longer contain a stray reader_c.py file, reader_c only exists as the compiled extension.

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

No, it is one less special case; the Makefile rule is the only thing that changed.

Related issue number

Follow up to #13388

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
    • N/A, build tooling only, covered by the existing websocket test suite with extensions enabled
  • Documentation reflects the changes
    • N/A
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • N/A, already listed
  • Add a new news fragment into the CHANGES/ folder
    • name it <issue_or_pr_num>.<type>.rst (e.g. 588.bugfix.rst)

Drafted with Claude Code; reviewed by bdraco.

@pyba-chronographer pyba-chronographer Bot added the bot:chronographer:provided There is a change note present in this PR label Aug 17, 2026
@codspeed

codspeed Bot commented Aug 17, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Aug 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.99%. Comparing base (7dc43ae) to head (b145e49).
⚠️ Report is 10 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #13457      +/-   ##
==========================================
+ Coverage   98.42%   98.99%   +0.57%     
==========================================
  Files         133      132       -1     
  Lines       49747    49455     -292     
  Branches     2628     2571      -57     
==========================================
- Hits        48961    48960       -1     
+ Misses        662      371     -291     
  Partials      124      124              
Flag Coverage Δ
Autobahn 22.08% <0.00%> (+0.12%) ⬆️
CI-GHA 98.90% <0.00%> (+0.58%) ⬆️
OS-Linux 98.68% <0.00%> (+0.58%) ⬆️
OS-Windows 97.03% <0.00%> (+0.57%) ⬆️
OS-macOS 97.92% <0.00%> (+0.57%) ⬆️
Py-3.10 98.12% <0.00%> (+0.58%) ⬆️
Py-3.11 98.38% <0.00%> (+0.58%) ⬆️
Py-3.12 98.46% <0.00%> (+0.57%) ⬆️
Py-3.13 98.45% <0.00%> (+0.57%) ⬆️
Py-3.14 98.47% <0.00%> (+0.57%) ⬆️
Py-3.14t 97.56% <0.00%> (+0.57%) ⬆️
Py-pypy-3.11 97.43% <0.00%> (+0.57%) ⬆️
VM-macos 97.92% <0.00%> (+0.57%) ⬆️
VM-ubuntu 98.68% <0.00%> (+0.58%) ⬆️
VM-windows 97.03% <0.00%> (+0.57%) ⬆️
cython-coverage 82.18% <0.00%> (-0.01%) ⬇️

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

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

@webknjaz

Copy link
Copy Markdown
Member

pre-commit.ci run

@bdraco bdraco added backport-3.14 Trigger automatic backporting to the 3.14 release branch by Patchback robot backport-3.15 Trigger automatic backporting to the 3.15 release branch by Patchback robot labels Aug 17, 2026
@bdraco
bdraco marked this pull request as ready for review August 17, 2026 16:32
@greptile-apps

greptile-apps Bot commented Aug 17, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge, with no concrete build, runtime, packaging, security, or consumer compatibility defect established.

The explicit Cython module name preserves the compiled extension identity, pure-Python fallback remains available when the extension is absent, and the remaining source edit only removes a coverage directive.

Reviews (1): Last reviewed commit: "Remove stale no branch pragma from the w..." | Re-trigger Greptile

@webknjaz webknjaz left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this overall.

Though, is this me or does the last in-branch commit come with a bunch of sudden indirect coverage increase? https://app.codecov.io/gh/aio-libs/aiohttp/commit/b145e495a4611ffdbc2fe3318989f5f312a0d7c4/indirect-changes. Is this flaky/unrelated?

@@ -0,0 +1 @@
Removed the ``aiohttp/_websocket/reader_c.py`` symlink from the source tree; the ``aiohttp._websocket.reader_c`` extension is now compiled directly from ``reader_py.py`` using ``cython --module-name``, so distributions no longer include a ``reader_c.py`` file that showed up as an uncovered module in coverage reports -- by :user:`bdraco`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Removed the ``aiohttp/_websocket/reader_c.py`` symlink from the source tree; the ``aiohttp._websocket.reader_c`` extension is now compiled directly from ``reader_py.py`` using ``cython --module-name``, so distributions no longer include a ``reader_c.py`` file that showed up as an uncovered module in coverage reports -- by :user:`bdraco`.
Removed the :file:`aiohttp/_websocket/reader_c.py` symlink from the source tree; the ``aiohttp._websocket.reader_c`` extension is now compiled directly from :file:`reader_py.py` using :command:`cython --module-name`, so distributions no longer include a :file:`reader_c.py` file that showed up as an uncovered module in coverage reports -- by :user:`bdraco`.

@Dreamsorcerer

Copy link
Copy Markdown
Member

Though, is this me or does the last in-branch commit come with a bunch of sudden indirect coverage increase? https://app.codecov.io/gh/aio-libs/aiohttp/commit/b145e495a4611ffdbc2fe3318989f5f312a0d7c4/indirect-changes. Is this flaky/unrelated?

Probably last commit on master failed, so has less coverage. The expected coverage is 98.99%, so it's correct.

@Dreamsorcerer
Dreamsorcerer merged commit e54b79c into master Aug 17, 2026
80 of 99 checks passed
@Dreamsorcerer
Dreamsorcerer deleted the drop-reader-c-symlink branch August 17, 2026 21:22
@patchback

patchback Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Backport to 3.15: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.15/e54b79cbae69e24d5e87469613e97a3d9bec0d4b/pr-13457

Backported as #13469

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

@patchback

patchback Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Dreamsorcerer pushed a commit that referenced this pull request Aug 17, 2026
…nsion without the reader_c.py symlink (#13469)

**This is a backport of PR #13457 as merged into master
(e54b79c).**

Co-authored-by: J. Nick Koston <nick@koston.org>
Dreamsorcerer pushed a commit that referenced this pull request Aug 17, 2026
…nsion without the reader_c.py symlink (#13470)

**This is a backport of PR #13457 as merged into master
(e54b79c).**

Co-authored-by: J. Nick Koston <nick@koston.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-3.14 Trigger automatic backporting to the 3.14 release branch by Patchback robot backport-3.15 Trigger automatic backporting to the 3.15 release branch by Patchback robot 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.

3 participants