Check your installed Python packages for version compatibility
Project description
🐍 pyupgradecheck
💡 Check your Python packages before you upgrade. Find out which of your dependencies are ready for your next Python version — and which ones might ruin your day.
🚀 Installation
pip install pyupgradecheck
⚡️ Quickstart
# Test all installed packages
pyupgradecheck 3.14
Example Output:
requests 2.32.3: supported (PyPI requires_python: >=3.7)
some-old-lib 1.2.0: incompatible (PyPI requires_python: <3.10)
⚙️ CLI Options Explained
🧩 --packages / -p
Manually specify one or more packages to check instead of scanning everything installed.
pyupgradecheck 3.14 --packages requests pandas httpx
# or short form:
pyupgradecheck 3.14 -p requests pandas httpx
Useful when you just want to sanity-check a few libs before doing a full environment sweep.
📦 --requirements / -r
Check packages listed in a requirements.txt file.
pyupgradecheck 3.14 --requirements requirements.txt
# or short form:
pyupgradecheck 3.14 -r requirements.txt
Great for CI pipelines or testing a project's dependency file without needing a full virtualenv.
💾 --json
Emit results in JSON instead of human-readable text.
pyupgradecheck 3.14 --json > compat-report.json
Perfect for CI/CD jobs or when you want to post-process results with another tool.
🧠 --strict
Be extra cautious — only marks a package as supported if both PyPI metadata
(requires_python) and package classifiers agree on the target Python version.
pyupgradecheck 3.14 --strict
This reduces false positives from packages that claim support but might not actually work yet.
If either data source disagrees or is missing, the status will be "unknown".
⚗️ Combo Examples
# Check just a few packages, strict mode, JSON output
pyupgradecheck 3.14 -p fastapi uvicorn pydantic --strict --json
# Check all from requirements.txt, strict mode
pyupgradecheck 3.14 -r requirements.txt --strict
💬 CLI Help
pyupgradecheck --help
🤔 Why pyupgradecheck?
Because upgrading Python shouldn't be a trust fall.
Quickly see which of your installed packages can handle your target Python version — before you break your dev environment or CI build.
⚠️ Disclaimer
pyupgradecheck checks declared compatibility, not guaranteed runtime behavior.
It uses metadata from PyPI (requires_python) and package classifiers
to estimate whether a library supports your target Python version.
That means:
- Some packages may say they support Python 3.13+, but still fail at runtime.
- C-extension builds, dependency pins, or missing wheels might break your install.
- Metadata may lag behind reality (maintainers forget to update it).
Always test your environment in a virtualenv before upgrading production systems. This tool gives you a heads-up, not a promise. 😅
❤️ Contributing
Pull requests welcome 💖
Run tests with:
pytest
🧩 Perfect for
- 🧪 CI/CD pipelines
- 🐍 Devs upgrading their local environments
- 🧠 Maintainers checking project compatibility
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyupgradecheck-0.2.0.tar.gz.
File metadata
- Download URL: pyupgradecheck-0.2.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70fc526ca3b08b44751f47aef61de7a994e1f1c737689ad44177a4bd1c8d7117
|
|
| MD5 |
f863551ce59461753c520108eba35c21
|
|
| BLAKE2b-256 |
d91556f2d0bac44ed64d38cc9c11ed4f9eb257725887169d78bc6df66a4f7407
|
File details
Details for the file pyupgradecheck-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pyupgradecheck-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f282c7c73ea33323e32506611383eafa402eb9c9045f9059a6e5e7a7a3cd3eb9
|
|
| MD5 |
236e0ae90c5a46b0920293a1b36d5379
|
|
| BLAKE2b-256 |
ea3cca04bb7066653c3089267c933a5a1469740575a2a044244dfcccc2776bb0
|