Python 3.12 package compatibility

With the release for 3.12 fairly imminent, are there any resources to help check if major packages are compatible?

Clearly the best option is to try it oneself, and the picture is bound to change rapidly, but if there are any centralised lists or if there’s some way to spot incompatibilities from any automated benchmark runs etc, that might save a bit of time, but I wasn’t sure where to look.

For well maintained projects that use classifiers, i.e. Programming Language :: Python :: 3.12, you can have a look at Search results · PyPI

1 Like

If you want a quick way to check the top 360 PyPI packages for this classifier, look no further than Python 3.12 Readiness - Python 3.12 support table for most popular Python packages . Only around 17% of packages currently have the classifier, but this is almost certainly a major undercount for those that are truly compatible, since:

  • It typically takes some time for it to get added
  • It only gets updated on new releases
  • Projects want to be conservative and actually build and test with 3.Y final before officially declaring compatibility (which will only get reflected in the next released version)
  • people often forget to update the classifiers
  • Many pure Python or Stable ABI projects will work out of the box without changes

If you have a specific package in mind, another way to infer compatibility is to check under the files tab to see if they are building cp12 tagged wheels; if they are, then they are very likely already tested to be 3.12-compatible. If not and they only have one wheel with a none-any tag, it is a pure Python package, which most likely will be compatible provided it has been reasonably well maintained and doesn’t use old deprecated modules or other functionality removed in Python 3.12 (which is albeit more common in this than most earlier version given a bunch of “dead batteries” were finally removed, most notably distutils).

Best of luck!

3 Likes

(It bothers me deeply to learn that six is still more frequently downloaded than NumPy.)

1 Like

The quickest way to know is to run your tests on 3.12. If it all passes, you’re good.

Many projects will not set specific version classifiers anymore, making the pyreadiness inaccurate. Don’t open issues about that.

Related PyPI feature request to make it easier to spot if wheels are available for a specific CPython version. For non pure Python packages, this would make it easier to tell at a glance if they’ve uploaded 3.12 wheels

1 Like

Thanks everyone

Pyreadiness looks like it’s the kind of thing I was after (and I appreciate there will be a degree of inaccuracy as David highlighted)