Skip to main content

Check and upgrade Python dependency versions in pyproject.toml and requirements.txt

Project description

python-check-updates

PyPI

Check and upgrade Python dependency versions against PyPI.

Installation

uv tool install python-check-updates

Usage

pcu          # check all dependencies for updates
pcu -u       # upgrade pinned versions and sync

It checks uv toml and fallback to requirements:

  • pyproject.toml — dependencies, optional-dependencies, dependency-groups
  • requirements.txt — dependencies

Filtering upgrades

Combine these flags with -u to restrict which bumps are applied:

  • --major — include major version bumps
  • --minor — include minor version bumps
  • --patch — include patch version bumps
  • --pin — include pin-only bumps (installed is already at latest, pin string is stale)
  • --drop pkg1 pkg2 ... — exclude named packages from the upgrade set

Flags combine as a union:

pcu -u --minor --patch            # minor + patch only, skip major
pcu -u --drop anthropic pydantic  # everything except these two
pcu -u --minor --drop cohere      # minor bumps, minus cohere

Safe upgrades

Before touching pyproject.toml, uv.lock, or requirements.txt, pcu snapshots the current contents into .pcu/ (which is auto-added to .gitignore). If uv sync or pip install fails, the snapshot is restored and a hint is printed suggesting --drop to exclude suspect packages on retry. On success, .pcu/ is cleaned up.

Output

  Package       Pinned    Installed   Latest    Status
  ─────────────────────────────────────────────────────

  [dependencies]
  httpx         >=0.28.1  0.28.1      0.28.3    minor update
  pydantic      >=2.12.5  2.12.5      2.12.5    up to date

  1 package(s) can be updated.
  Run pcu -u to upgrade.

Upgrade rewrites version pins in-place, syncs with uv sync or pip install, and verifies.

License

MIT

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

python_check_updates-0.2.0.tar.gz (27.1 kB view details)

Uploaded Source

Built Distribution

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

python_check_updates-0.2.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file python_check_updates-0.2.0.tar.gz.

File metadata

  • Download URL: python_check_updates-0.2.0.tar.gz
  • Upload date:
  • Size: 27.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for python_check_updates-0.2.0.tar.gz
Algorithm Hash digest
SHA256 438df2e6fff9a4986caabf827f068b127374fe80c2c49b28aa191c0af15acbec
MD5 3128fe23e38c6ad97b60d9cf23d9dc7b
BLAKE2b-256 7ce226e0b638f64f13cb271a49c79a9ccac96e2ea821016ba7159384e6970306

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_check_updates-0.2.0.tar.gz:

Publisher: publish.yml on frndvrgs/python-check-updates

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file python_check_updates-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for python_check_updates-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ab7225955ac9be3673e5bc78c774d9f1fb3f622358a3de15d6f89da1bad29d7
MD5 f1e8364604aa4e5e7505e0dd612ab290
BLAKE2b-256 1b3680273b950efe33d88d010b60b8b458e49dd82195c8d68785700a5c83ba02

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_check_updates-0.2.0-py3-none-any.whl:

Publisher: publish.yml on frndvrgs/python-check-updates

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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