Skip to content

Use Cython 3.1 universally - #117

Merged
bdraco merged 5 commits into
aio-libs:masterfrom
lysnikolaou:use-cython-31
Jun 9, 2025
Merged

bdraco merged 5 commits into
aio-libs:masterfrom
lysnikolaou:use-cython-31

Conversation

@lysnikolaou

@lysnikolaou lysnikolaou commented Jun 3, 2025 •

Copy link
Copy Markdown
Contributor

What do these changes do?

  • Use Cython 3.1 universally across the build path
  • Delete unnecessary requirements files
  • Switch back to actions/setup-python

Are there changes in behavior for the user?

No.
closes #113

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes

@pyba-chronographer pyba-chronographer Bot added the bot:chronographer:provided There is a change note present in this PR label Jun 3, 2025
Comment thread packaging/pep517_backend/_backend.py Resolved
@codspeed

codspeed Bot commented Jun 3, 2025 •

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #117 will degrade performances by 10.86%

Comparing lysnikolaou:use-cython-31 (dadefc5) with master (beb5475)

Summary

❌ 3 regressions
✅ 1 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
❌ test_cached_property_cache_miss 138 µs 149.8 µs -7.86%
❌ test_under_cached_property_cache_hit 68.8 µs 77.1 µs -10.86%
❌ test_under_cached_property_cache_miss 136.6 µs 149.8 µs -8.83%

@codecov

codecov Bot commented Jun 3, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.84%. Comparing base (beb5475) to head (dadefc5).
⚠️ Report is 24 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #117      +/-   ##
==========================================
+ Coverage   97.72%   97.84%   +0.11%     
==========================================
  Files          18       18              
  Lines         792      789       -3     
  Branches       41       41              
==========================================
- Hits          774      772       -2     
+ Misses         10        9       -1     
  Partials        8        8              
Flag Coverage Δ
CI-GHA 97.84% <100.00%> (+0.11%) ⬆️
MyPy 93.23% <100.00%> (+0.10%) ⬆️
OS-Linux 97.20% <ø> (ø)
OS-Windows 93.27% <ø> (ø)
OS-macOS 93.90% <ø> (ø)
Py-3.10.11 91.87% <ø> (ø)
Py-3.10.17 93.90% <ø> (ø)
Py-3.11.12 95.68% <ø> (ø)
Py-3.11.9 93.65% <ø> (ø)
Py-3.12.10 95.68% <ø> (ø)
Py-3.13.1 ?
Py-3.13.3 95.23% <ø> (-0.45%) ⬇️
Py-3.13.4t 95.23% <ø> (?)
Py-3.9.13 91.85% <ø> (ø)
Py-3.9.22 93.89% <ø> (ø)
Py-pypy7.3.16 92.97% <ø> (ø)
Py-pypy7.3.19 92.99% <ø> (ø)
VM-macos-latest 93.90% <ø> (ø)
VM-ubuntu-latest 97.20% <ø> (ø)
VM-windows-latest 93.27% <ø> (ø)
pytest 97.20% <ø> (ø)

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Dreamsorcerer

Copy link
Copy Markdown
Member

Thanks for that.

@bdraco Do you want to check anything with the benchmark regressions? I assume there's not much we can do..

@bdraco

bdraco commented Jun 3, 2025

Copy link
Copy Markdown
Member

It looks like the cache path is showing the tracing overhead which won't actually happen in the production build because we don't build with tracing.

In the non cache path there is argument parsing happening now. That might be a regression in Cython that we need to report

@bdraco

bdraco commented Jun 3, 2025

Copy link
Copy Markdown
Member

self.wrapped(inst) looks like it's more expensive which is the regression we need to report

hswong3i added a commit to alvistack/aio-libs-propcache that referenced this pull request Jun 4, 2025
    git clean -xdf
    git submodule sync --recursive
    git submodule update --init --recursive
    tar zcvf ../python-propcache_0.3.1.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-propcache.spec ../python-propcache_0.3.1-1.spec
    cp ../python*-propcache*0.3.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/aio-libs-propcache-0.3.1/
    rm -rf ../python*-propcache*0.3.1*.*

See aio-libs#117

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
hswong3i added a commit to alvistack/aio-libs-propcache that referenced this pull request Jun 4, 2025
    git clean -xdf
    git submodule sync --recursive
    git submodule update --init --recursive
    tar zcvf ../python-propcache_0.3.1.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-propcache.spec ../python-propcache_0.3.1-1.spec
    cp ../python*-propcache*0.3.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/aio-libs-propcache-0.3.1/
    rm -rf ../python*-propcache*0.3.1*.*

See aio-libs#117

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
hswong3i added a commit to alvistack/aio-libs-propcache that referenced this pull request Jun 4, 2025
    git clean -xdf
    git submodule sync --recursive
    git submodule update --init --recursive
    tar zcvf ../python-propcache_0.3.1.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-propcache.spec ../python-propcache_0.3.1-1.spec
    cp ../python*-propcache*0.3.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/aio-libs-propcache-0.3.1/
    rm -rf ../python*-propcache*0.3.1*.*

See aio-libs#117
See https://build.opensuse.org/projects/openSUSE:Factory/packages/python-propcache/files/reproducible.patch

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
Comment thread requirements/cython.txt Resolved
@bdraco
bdraco enabled auto-merge (squash) June 9, 2025 21:31
@bdraco
bdraco merged commit 3c03ef0 into aio-libs:master Jun 9, 2025
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.

Does not build with cython 3.1.x

3 participants