Skip to content

feat(step): add "uv python" step#1122

Draft
GideonBear wants to merge 18 commits intotopgrade-rs:mainfrom
GideonBear:uv-python-release-update
Draft

feat(step): add "uv python" step#1122
GideonBear wants to merge 18 commits intotopgrade-rs:mainfrom
GideonBear:uv-python-release-update

Conversation

@GideonBear
Copy link
Member

What does this PR do

Adds a disabled-by-default "uv python" step, that checks for new available versions and installs them automatically.
Is this acceptable?

Standards checklist

  • The PR title is descriptive
  • I have read CONTRIBUTING.md
  • Optional: I have tested the code myself
  • If this PR introduces new user-facing messages they are translated

For new steps

  • Optional: Topgrade skips this step where needed
  • Optional: The --dry-run option works with this step
  • Optional: The --yes option works with this step if it is supported by
    the underlying command


debug!("Found latest version: {latest:?}");

// TODO: support multiple versions. Install new patch releases for each? Optionally install new minor release?

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment

impl UvPythonVersionData {
/// Returns `None` when the version is undesirable, that is when any of the following conditions is met:
/// - It's a pre-release (we don't care about pre-releases) (TODO: add an option to care about pre-releases)

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
@GideonBear
Copy link
Member Author

There are plans to add something similar within uv (astral-sh/uv#7325, astral-sh/uv#7892, astral-sh/uv#7287, astral-sh/uv#8028, astral-sh/uv#4718), but that's probably still a long time away.

@GideonBear
Copy link
Member Author

GideonBear commented May 28, 2025

I realized that uv tool install --reinstall does not work with uv tool install --with. Potentially this is something to be added in uv itself?

@GideonBear
Copy link
Member Author

but that's probably still a long time away.

That aged badly... Astral is way quicker with this stuff than I anticipated 😂

I'll revisit this soon, to add uv python --upgrade, and maybe still a step for upgrading the major version?

@GideonBear GideonBear changed the title Add "uv python" step feat(step): add "uv python" step Oct 13, 2025
barkleesanders added a commit to barkleesanders/topgrade that referenced this pull request Mar 8, 2026
From PR topgrade-rs#1122.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
barkleesanders added a commit to barkleesanders/topgrade that referenced this pull request Mar 8, 2026
- Fix unclosed delimiter in config.rs (missing closing brace for plasmoids_get_excluded)
- Resolve PR topgrade-rs#1122 merge conflict: keep both HEAD fields (doom, cargo, rustup, pkgfile) and add uv_python
- Remove duplicate serde_json entry in Cargo.toml
- Remove unused get_require_sudo_string import from generic.rs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant