When setting up pre-commit for the first time, PyO3 complained that I was using Python 3.14 when it currently only supports up to Python 3.13. PyO3 supports an env variable PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1
with the following explanation:
the configured Python interpreter version (3.14) is newer than PyO3’s maximum supported version (3.13)
please check if an updated version of PyO3 is available. Current version: 0.22.5
set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 to suppress this check and build anyway using the stable ABI
Using that environment variable got me past the first time setup. However, when trying to investigate the issue for future contributors in the same boat, I haven’t yet been able to reproduce the problem. I can remove the compatibility environment variable, and delete everything in ~/.cache/pre-commit, and no longer get complaints from PyO3. It may be that PyO3 was performing some one-time setup elsewhere on my machine?
I’m not sure where to go from here if I can’t reproduce the issue. We don’t want first time contributors to have to guess at how to set up pre-commit like I did. Do we just need to suggest setting that env var in the first time contributor documentation?