Skip to main content

pyupcheck

Check if upgrading a Python dependency will break your code.

$ pyupcheck check requests 3.0.0

pyupcheck 2.31.0 -> 3.0.0

Found 14 usages across 5 files.
Found 3 potentially breaking/deprecated changes.

BREAKING (1):

  x src/api.py:23  resp = requests.get(url, verify=False)
    Removed: `verify` parameter no longer accepted

DEPRECATED (1):

  ! src/utils.py:8  from requests.packages import urllib3
    Deprecated: use `urllib3` directly instead

12 other usages are safe.

╭─ pyupcheck report ──────────────────────────────────╮
│ Upgrade risky. 1 breaking change(s) affect your    │
│ code.                                              │
╰────────────────────────────────────────────────────╯

Install

pip install pyupcheck

Usage

Check an upgrade

# check against a specific version
pyupcheck check flask 3.0.0

# check against the latest version
pyupcheck check flask

# scan a specific directory
pyupcheck check requests 3.0.0 --dir ./src

# json output for CI
pyupcheck check requests 3.0.0 --json-output

Exit code is 1 if breaking changes are found, 0 otherwise. Use this in CI to gate upgrades.

Scan your code

# just see what APIs you use from a package
pyupcheck scan requests

List versions

pyupcheck versions flask

How it works

  1. Scans your .py files with AST parsing to find every import and usage of the target package
  2. Fetches the changelog from GitHub releases and PyPI metadata
  3. Parses the changelog for breaking changes, deprecations, and renames
  4. Cross-references your usage against the changes
  5. Reports which of your usages are at risk

Limitations

  • Changelog parsing relies on maintainers writing structured changelogs. If a project has unstructured notes, pyupcheck may miss changes.
  • Dynamic attribute access (getattr(requests, method_name)) is not detected.
  • Only scans .py files (not Jupyter notebooks, config files, etc.)

Options

Flag Description
--dir, -d Directory to scan (default: .)
--github-token GitHub token for higher API rate limits (or set GITHUB_TOKEN env var)
--json-output, -j Output as JSON

License

MIT

Download files

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

Source Distribution

pyupcheck-0.1.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

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

pyupcheck-0.1.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file pyupcheck-0.1.0.tar.gz.

File metadata

  • Download URL: pyupcheck-0.1.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for pyupcheck-0.1.0.tar.gz
Algorithm Hash digest
SHA256 651b90ad9f28182f49596131d864fd5641ddf1476ca9f0facc52b81757ba706b
MD5 e85ac7e4f095f163b5672193c9b0918e
BLAKE2b-256 b35324c87fbff63428b14dd89d2eb27d34993a3eefa3a29e33d020fe457c4668

See more details on using hashes here.

File details

Details for the file pyupcheck-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyupcheck-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for pyupcheck-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c2daf957574c52711bc15365809732f8eb75f0ebb33b65c88add61076d0609e
MD5 23581ab954ce25e9506c61bc404b662c
BLAKE2b-256 e7b23010ebb1486c7c27f4d24f1d84de8f6d2244a5e1532bf11c63aa38209f55

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