Skip to main content

Bump pyproject.toml dependency minimum versions to latest feasible versions.

Project description

UV-bump

Bump pyproject.toml dependency minimum versions to latest feasible versions.

WARNING: this tool is provided as-is and doesn't come with warranty. Please make sure your code has been backed up and/or version controlled in case something goes wrong.

Howto

Within your project, ensure that it is clean. That is:

  1. your uv.lock file is up to date and commited
  2. your .venv is up to date

Run uv sync --all-extras if you are unsure, and commit your lock file if any changes.

Proceed by installing the tool and running it:

uvx uv-bump

Alternatively, if you want to add uv-bump to your development dependencies:

uv add --dev uv-bump
uv-bump

UV-bump will run uv sync, which updates the packages in your virtual environment and your uv.lock file, and in addition updates pyproject.toml by bumping all minimum bounds to the version installed. Review the changes, and when happy, commit.

UV-bump will respect your currently set version pins and bounds. For example, if you specify polars==1.20.0, Polars won't be updated, although newer versions are available. Similarly, if you set plotly>=5.0,<6.0 version 6 of Plotly will not be selected. To make these available, change the specifications to use >= without an upper bound. If you find that a particular package upgrade is difficult and warrants more attention, edit pyproject.toml to add an upper bound, and re-run UV-bump. In this way, you can keep up to date on all the non-breaking changes whilst holding back bigger updates if needed.

Why uv-bump?

UV-bump is a tool help application developers keep up to date on their dependencies. For library developers, the pyproject.toml dependency specifications are usually set as wide as possible. However, for application developers, this is not desirable, and ideally versions are being kept up-to-date to incorporate bug fixes and, if desired, feature upgrades. Although uv sync --upgrade will up the versions in your uv.lock file, it won't touch the pyproject.toml file. This causes the dependency specifications to lag reality. For example, say you use package X version Y, and specify "PackageX>=Y". Over time, a new version, Z, comes out. The uv.lock file is updated with uv sync --upgrade, and you end up using the new version, and start using some of the new features. Effectively, pyproject.toml is now outdated, your application won't work any longer with version Y, but only version Z, which can cause problems down the road.

FAQ

Q1. Help, UV-bump does not select the latest version?

A1. UV-bump uses UV to resolve package requirements. It may well be that amongst your dependencies one or more are holding your dependency back.

Q2. will UV add native support for this functionality?

A2. See the issue tracker: https://github.com/astral-sh/uv/issues/6794

Q3. Can I see which of my dependencies are outdated?

A3. uv pip list --outdated. This does not, per Q1, mean that they can actually all be updated to the latest version.

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

uv_bump-0.3.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

uv_bump-0.3.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file uv_bump-0.3.1.tar.gz.

File metadata

  • Download URL: uv_bump-0.3.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for uv_bump-0.3.1.tar.gz
Algorithm Hash digest
SHA256 a4fb9f366169b657973a57cde10f75890c7776edf6e4451349f0dfaea89ceb17
MD5 0c61f588c9bedd8507b45719a5be8844
BLAKE2b-256 764be06a8613f78eb1f27c2a035d6aa856e4244b152a483025bd63f5f47fb391

See more details on using hashes here.

File details

Details for the file uv_bump-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: uv_bump-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for uv_bump-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4e3b2c7f95e444b44784a715975266ab30ae79776c2d5d71eab38d22c8767a1e
MD5 51fd73741be05892e50167c217b9726d
BLAKE2b-256 cf2bc341295394b63a6fe5407fd9ed3a148b255d9f5d3dc5b3db9a55a2c99082

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