Skip to content

Add cp314t wheel builds and clean up testing - #320

Merged
jonathanunderwood merged 6 commits into
python-lz4:masterfrom
ngoldbaum:cp314t
Apr 9, 2026
Merged

jonathanunderwood merged 6 commits into
python-lz4:masterfrom
ngoldbaum:cp314t

Conversation

@ngoldbaum

@ngoldbaum ngoldbaum commented Nov 3, 2025 •

Copy link
Copy Markdown
Contributor

Fixes #326

This is a re-do of #316 (ping @cclauss). I don't know why the new failure only happens under cp314t, but I eventually tracked down the allocation tracemalloc complains about to be coming from coverage internals. See this gist, which includes a little extra debug output in the failed assertion.

I made use of the no_cover mark from pytest-cov to skip coverage on tests that measure memory usage using tracemalloc. I also marked all of the tests that use tracemalloc as thread-unsafe.

Finally I did some cleanup of the testing configuration. There's no need to do anything special to install and use pytest-run-parallel if you're only going to use one thread to execute the tests. I also added reasons for all the thread_unsafe marks. Unfortunately doing that requires adding a dummy mark when pytest-run-parallel isn't installed, otherwise pytest warns about a mark it doesn't know about.

Let me know if you'd prefer I split this up into multiple PRs.

@cclauss cclauss left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approve once CI passes. Thanks for all your work and the detailed explanations.

@ngoldbaum

Copy link
Copy Markdown
Contributor Author

Here's a passing CI run from my fork: https://github.com/ngoldbaum/python-lz4/actions/runs/19049344029

@ngoldbaum

Copy link
Copy Markdown
Contributor Author

@jonathanunderwood I see you did another release yesterday. It'd be really nice to get this PR merged and ship another release with this. Right now there's no cp314t wheel, which is a bit surprising given the cp313t wheel.

I don't think there's any problem with cp314t per se, it's just somehow made it more likely to trigger a random failure due to triggering allocations in coverage while the test is running. I think this might be the root cause for you bumping up the threshold to fail the test a few year ago in 499ee4a.

@ngoldbaum

Copy link
Copy Markdown
Contributor Author

Ping @jonathanunderwood - I'd really appreciate having a maintainer look this over. Let me know if you'd like anything from me to help get this over the line.

@ngoldbaum

Copy link
Copy Markdown
Contributor Author

Ping @jonathanunderwood it'd be really nice to have cp314t wheels on PyPI. I don't think there's anything wrong using python-lz4 on 3.14t. It just happened to trigger a random behavior in coverage that made a test failure you're already working around happen more often. This PR fixes that issue.

If you'd prefer I don't set up pytest-run-parallel, just let me know.

@yilei

yilei commented Feb 25, 2026

Copy link
Copy Markdown

(I closed my #327 in favor of this PR, for #326).

@jonathanunderwood
jonathanunderwood merged commit 43b672d into python-lz4:master Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FR: Provide pre-built Python 3.14 free-threaded wheels

4 participants