python_readiness
Are your dependencies ready for new Python?
Installation
pip install python_readiness
Alternatives include:
uvx python_readiness- It's a single file script that contains PEP 723 metadata
Usage
Check if a specific package is ready for a specific Python:
python_readiness -p numpy --python 3.11
This will print the requirement you need to ensure that numpy supports that Python:
λ python_readiness -p numpy --python 3.13
numpy>=2.1.0 # has_classifier_and_explicit_wheel
λ python_readiness -p numpy --python 3.12
numpy>=1.26.0 # has_classifier_and_explicit_wheel
λ python_readiness -p numpy --python 3.11
numpy>=1.23.3 # has_classifier_and_explicit_wheel
λ python_readiness -p 'numpy>=2' --python 3.11
numpy>=2 # has_classifier_and_explicit_wheel (existing requirement ensures support)
Check if a requirements file is ready for a specific Python:
python_readiness -r requirements.txt --python 3.13
This will output new requirements that ensure your environment is restricted to versions that will support the specified Python version. In particular, look at lines containing "previously". These are the minimum versions you will need to upgrade to for support.
I find this really useful for updating constraints files when incrementally upgrading a large codebase to a new Python.
Check if your current environment is ready for the latest Python:
python_readiness
Check if another virtual environment is ready for the latest Python:
python_readiness -e path/to/.venv
See all options:
python_readiness --help
What are the exact definitions of readiness this uses?
Take a look at the code, in particular support_from_files.
It's primarily based on wheel tags and classifiers, but looks at some other metadata and has a few interesting tricks.
python_readiness currently classifies package versions as one of the following levels of support:
Explicitly supported:
has_classifier_and_explicit_wheel
Bothhas_classifierandhas_explicit_wheelare true.has_classifier
Has a trove classifier for the corresponding Python version.has_explicit_wheel
Has a wheel that specifically supports the corresponding Python version (includes abi3 wheels targeting specifically that Python)is_requires_python_lower_bound
Niche, but ifRequires-Python: >=3.9then the package explicitly supports 3.9.
Potentially supported:
has_viable_wheel
Has a wheel that is installable on the Python version, but has no explicit indication that upstream has ever run it with that Python version.totally_unknown
This is usually because the package only provides an sdist.
Unsupported:
unsupported
Also, if you're interested in looking at the code — the bisection code we use to find earliest supported versions is interesting, since it can handle non-monotonic support, e.g. in the case of backports.
Release files for python-readiness 2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python_readiness-2.2.tar.gz | 11.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_readiness-2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.6 kB
Release files / python_readiness-2.2.tar.gz
| Download URL | python_readiness-2.2.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d34a471edd937eb0a64eee68796b4216b3ae0e69e3b93cd48f606cd85e048f60
|
|
BLAKE2b-256 checksum How to use checksums |
70ecb47eddc8ded58f7e18f7ebbdc3f618e5017c453a9bd01b594918cb6ca8bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Release files / python_readiness-2.2-py3-none-any.whl
| Download URL | python_readiness-2.2-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
20b2ce042bdd054c8df437ef4bac553d81c9a97587847afc446c5825c35c68c8
|
|
BLAKE2b-256 checksum How to use checksums |
24e9a717577f622e810d6a0ca616c99dce71509a200472d0124fc1e59605ecc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|