Skip to main content

Check your installed Python packages for version compatibility

Project description

🐍 pyupgradecheck

PyPI CI

💡 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyupgradecheck-0.2.1.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyupgradecheck-0.2.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file pyupgradecheck-0.2.1.tar.gz.

File metadata

  • Download URL: pyupgradecheck-0.2.1.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

Hashes for pyupgradecheck-0.2.1.tar.gz
Algorithm Hash digest
SHA256 64b205970b9ce6adaeb2c1027ab7e2b9c0c673bb0c00bb7cf94a94c758868406
MD5 cc288d43f6191d0acb9908dee9b2350c
BLAKE2b-256 bcb0e498e697758664fdec8a11d58a94c2dad24ee687e43b28866a05a185934e

See more details on using hashes here.

File details

Details for the file pyupgradecheck-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pyupgradecheck-0.2.1-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

Hashes for pyupgradecheck-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 938ed6b3eeda015fcd54a5d8e95d065d55c9d428abac9232c6b950d82ee741d5
MD5 b0fcdddbd7249b86ffd5c564ea470699
BLAKE2b-256 f8170b85ad50ce9092811136f472fcd67f4ac3cb96f8d5113ef7f2b404e67358

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page