💡 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.
pip install pyupgradecheck# Test all installed packages
pyupgradecheck 3.14Example Output:
requests 2.32.3: supported (PyPI requires_python: >=3.7)
some-old-lib 1.2.0: incompatible (PyPI requires_python: <3.10)
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 httpxUseful when you just want to sanity-check a few libs before doing a full environment sweep.
Check packages listed in a requirements.txt file.
pyupgradecheck 3.14 --requirements requirements.txt
# or short form:
pyupgradecheck 3.14 -r requirements.txtGreat for CI pipelines or testing a project's dependency file without needing a full virtualenv.
Emit results in JSON instead of human-readable text.
pyupgradecheck 3.14 --json > compat-report.jsonPerfect for CI/CD jobs or when you want to post-process results with another tool.
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 --strictThis 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".
# 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 --strictpyupgradecheck --helpBecause 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.
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. 😅
Pull requests welcome 💖
Run tests with:
pytest- 🧪 CI/CD pipelines
- 🐍 Devs upgrading their local environments
- 🧠 Maintainers checking project compatibility
