pip-tools icon indicating copy to clipboard operation
pip-tools copied to clipboard

Support for Python 3.12+?

Open ckaldemeyer opened this issue 1 year ago • 6 comments

What's the problem this feature will solve?

So far, pip-tools is only supported until Python 3.11.

Describe the solution you'd like

Support for Python 3.12 and possibly Python 3.13.

Alternative Solutions

Additional context

We are using pip-tools in a production environment and need to update our python versions. Thus, support for newer versions would help us to migrate.

ckaldemeyer avatar Dec 02 '24 08:12 ckaldemeyer

Technically, given that this is a pure-python project wrapping pip, I'd expect it to “just work” under those versions, even though they aren't explicitly tested in CI, nor are they listed among the Trove specifiers. So this is mostly about documenting stuff in metadata+CI, likely.

webknjaz avatar Dec 04 '24 14:12 webknjaz

Thanks for your quick reply. So if I understand you right, you do not intend to add tests for specific Python versions and changing the packages metadata within a new release should be sufficient in order to indicate that it should work under these versions as well?

ckaldemeyer avatar Dec 05 '24 07:12 ckaldemeyer

I've been using pip-tools on projects that migrated to 3.12 for a while without issues.

I recently migrated one to 3.13 without issues too.

WhyNotHugo avatar Dec 05 '24 07:12 WhyNotHugo

@ckaldemeyer new tests are likely unnecessary, but we need to add newer Pythons to the CI matrix. Doing so may reveal some differences via failing tests. We'll see and have to adjust something if that happens.

webknjaz avatar Dec 05 '24 20:12 webknjaz

As for the metadata, I usually add trove classifiers together with adding CI jobs for said versions.

webknjaz avatar Dec 05 '24 20:12 webknjaz

I'm running into some issues when using pip-tools on 3.12, at a glance similar to the one discussed in https://github.com/jazzband/pip-tools/pull/2148, where I get AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? when I run pip-compile.

Is there a (relatively easy) way around this at the moment, or do we need to either downgrade our python or wait till the PR is released? Thank you!

mfxuus avatar May 04 '25 04:05 mfxuus

With Python 3.14 (pi!) on the horizon, perhaps it could be worth checking whether Py3.13 is in good shape by adding it to the GitHub Actions continuous integration testing matrix, and if so, then also to the package's Python version support classifiers?

I think I could attempt that next week, unless anyone else would like to.

jayaddison avatar Sep 26 '25 15:09 jayaddison

If you have time to try it, that would be awesome, please do!

There's one more bug I want to solve for 7.5.1, so my attention is elsewhere. I don't think testing against 3.13 is a blocker for releasing 7.5.1, but it's still important and we appreciate any and all help we can get to keep the project healthy!

sirosen avatar Sep 26 '25 16:09 sirosen