mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-01 20:31:12 +00:00
Treat --upgrade-package on the command-line as overriding upgrade = false in configuration (#15395)
## Summary Right now, if you put `upgrade = false` in a `uv.toml`, then pass `--upgrade-package numpy` on the CLI, we won't upgrade NumPy. This PR fixes that interaction by ensuring that when we "combine", we look at those arguments holistically (i.e., we bundle `upgrade` and `upgrade-package` into a single struct, which then goes through the `.combine` logic), rather than combining `upgrade` and `upgrade-package` independently. If approved, I then need to add the same thing for `no-build-isolation`, `reinstall`, `no-build`, and `no-binary`.
This commit is contained in:
parent
b950453891
commit
0397595e53
8 changed files with 357 additions and 145 deletions
|
|
@ -14,7 +14,7 @@ use uv_pep440::VersionSpecifiers;
|
|||
use uv_pep508::PackageName;
|
||||
use uv_pypi_types::VerbatimParsedUrl;
|
||||
use uv_redacted::DisplaySafeUrl;
|
||||
use uv_settings::{GlobalOptions, ResolverInstallerOptions};
|
||||
use uv_settings::{GlobalOptions, ResolverInstallerSchema};
|
||||
use uv_warnings::warn_user;
|
||||
use uv_workspace::pyproject::{ExtraBuildDependency, Sources};
|
||||
|
||||
|
|
@ -424,7 +424,7 @@ pub struct ToolUv {
|
|||
#[serde(flatten)]
|
||||
pub globals: GlobalOptions,
|
||||
#[serde(flatten)]
|
||||
pub top_level: ResolverInstallerOptions,
|
||||
pub top_level: ResolverInstallerSchema,
|
||||
pub override_dependencies: Option<Vec<uv_pep508::Requirement<VerbatimParsedUrl>>>,
|
||||
pub constraint_dependencies: Option<Vec<uv_pep508::Requirement<VerbatimParsedUrl>>>,
|
||||
pub build_constraint_dependencies: Option<Vec<uv_pep508::Requirement<VerbatimParsedUrl>>>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue