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.1.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.1-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_check_updates-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 43f4f23b3e79e1e2008829bb6ff63b355bdbe4d1a252846d5e19dee753c2e170
MD5 5a384e926bd445025de1e027a1b377a9
BLAKE2b-256 875be4c7876e5e8964dfae6ca8c39a36e636ec6e9d4582ab9d91cfe713e6646e

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_check_updates-0.2.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for python_check_updates-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f013a5cc31fab137698e4d21b183d1e4d35be4fc8e53f7577916aebb7c4149ee
MD5 f02381ecb5d6074d43077e921f4e192c
BLAKE2b-256 e7c987bb20c82c9219856e9eea8a66df872bc095f011785bea7e31eae8fa3067

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_check_updates-0.2.1-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