Skip to content

Commit c05aca6

Browse files
authored
temporarily disable new uv pip dependency-group flags (#10909)
We'll probably end up shipping but we were moving ahead with this on the basis that pip may not even ship this, so let's play it safe and wait for a bit.
1 parent 86f2f16 commit c05aca6

File tree

8 files changed

+5
-1064
lines changed

8 files changed

+5
-1064
lines changed

crates/uv-cli/src/lib.rs

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,40 +1014,6 @@ pub struct PipCompileArgs {
10141014
#[arg(long, overrides_with("all_extras"), hide = true)]
10151015
pub no_all_extras: bool,
10161016

1017-
/// Include dependencies from the specified dependency group.
1018-
///
1019-
/// Only applies to `pyproject.toml` sources.
1020-
///
1021-
/// May be provided multiple times.
1022-
#[arg(long, conflicts_with("only_group"))]
1023-
pub group: Vec<GroupName>,
1024-
1025-
/// Exclude dependencies from the specified dependency group.
1026-
///
1027-
/// Only applies to `pyproject.toml` sources.
1028-
///
1029-
/// May be provided multiple times.
1030-
#[arg(long)]
1031-
pub no_group: Vec<GroupName>,
1032-
1033-
/// Only include dependencies from the specified dependency group.
1034-
///
1035-
/// The project itself will also be omitted.
1036-
///
1037-
/// Only applies to `pyproject.toml` sources.
1038-
///
1039-
/// May be provided multiple times.
1040-
#[arg(long, conflicts_with("group"))]
1041-
pub only_group: Vec<GroupName>,
1042-
1043-
/// Include dependencies from all dependency groups.
1044-
///
1045-
/// Only applies to `pyproject.toml` sources.
1046-
///
1047-
/// `--no-group` can be used to exclude specific groups.
1048-
#[arg(long, conflicts_with_all = [ "group", "only_group" ])]
1049-
pub all_groups: bool,
1050-
10511017
#[command(flatten)]
10521018
pub resolver: ResolverArgs,
10531019

@@ -1606,40 +1572,6 @@ pub struct PipInstallArgs {
16061572
#[arg(long, overrides_with("all_extras"), hide = true)]
16071573
pub no_all_extras: bool,
16081574

1609-
/// Include dependencies from the specified dependency group.
1610-
///
1611-
/// Only applies to `pyproject.toml` sources.
1612-
///
1613-
/// May be provided multiple times.
1614-
#[arg(long, conflicts_with("only_group"))]
1615-
pub group: Vec<GroupName>,
1616-
1617-
/// Exclude dependencies from the specified dependency group.
1618-
///
1619-
/// Only applies to `pyproject.toml` sources.
1620-
///
1621-
/// May be provided multiple times.
1622-
#[arg(long)]
1623-
pub no_group: Vec<GroupName>,
1624-
1625-
/// Only include dependencies from the specified dependency group.
1626-
///
1627-
/// The project itself will also be omitted.
1628-
///
1629-
/// Only applies to `pyproject.toml` sources.
1630-
///
1631-
/// May be provided multiple times.
1632-
#[arg(long, conflicts_with("group"))]
1633-
pub only_group: Vec<GroupName>,
1634-
1635-
/// Include dependencies from all dependency groups.
1636-
///
1637-
/// Only applies to `pyproject.toml` sources.
1638-
///
1639-
/// `--no-group` can be used to exclude specific groups.
1640-
#[arg(long, conflicts_with_all = [ "group", "only_group" ])]
1641-
pub all_groups: bool,
1642-
16431575
#[command(flatten)]
16441576
pub installer: ResolverInstallerArgs,
16451577

crates/uv-settings/src/settings.rs

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use uv_distribution_types::{
1313
};
1414
use uv_install_wheel::linker::LinkMode;
1515
use uv_macros::{CombineOptions, OptionsMetadata};
16-
use uv_normalize::{ExtraName, GroupName, PackageName};
16+
use uv_normalize::{ExtraName, PackageName};
1717
use uv_pep508::Requirement;
1818
use uv_pypi_types::{SupportedEnvironments, VerbatimParsedUrl};
1919
use uv_python::{PythonDownloads, PythonPreference, PythonVersion};
@@ -1111,50 +1111,6 @@ pub struct PipOptions {
11111111
"#
11121112
)]
11131113
pub no_extra: Option<Vec<ExtraName>>,
1114-
/// Include optional dependencies from the specified group; may be provided more than once.
1115-
///
1116-
/// Only applies to `pyproject.toml` sources.
1117-
#[option(
1118-
default = "[]",
1119-
value_type = "list[str]",
1120-
example = r#"
1121-
group = ["dev", "docs"]
1122-
"#
1123-
)]
1124-
pub group: Option<Vec<GroupName>>,
1125-
/// Exclude optional dependencies from the specified group if `all-groups` are supplied
1126-
///
1127-
/// Only applies to `pyproject.toml` sources.
1128-
#[option(
1129-
default = "[]",
1130-
value_type = "list[str]",
1131-
example = r#"
1132-
no-group = ["dev", "docs"]
1133-
"#
1134-
)]
1135-
pub no_group: Option<Vec<GroupName>>,
1136-
/// Exclude only dependencies from the specified group.
1137-
///
1138-
/// Only applies to `pyproject.toml` sources.
1139-
#[option(
1140-
default = "[]",
1141-
value_type = "list[str]",
1142-
example = r#"
1143-
only-group = ["dev", "docs"]
1144-
"#
1145-
)]
1146-
pub only_group: Option<Vec<GroupName>>,
1147-
/// Include all groups.
1148-
///
1149-
/// Only applies to `pyproject.toml` sources.
1150-
#[option(
1151-
default = "false",
1152-
value_type = "bool",
1153-
example = r#"
1154-
all-groups = true
1155-
"#
1156-
)]
1157-
pub all_groups: Option<bool>,
11581114
/// Ignore package dependencies, instead only add those packages explicitly listed
11591115
/// on the command line to the resulting the requirements file.
11601116
#[option(

crates/uv/src/settings.rs

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,10 +1513,6 @@ impl PipCompileSettings {
15131513
extra,
15141514
all_extras,
15151515
no_all_extras,
1516-
group,
1517-
no_group,
1518-
only_group,
1519-
all_groups,
15201516
build_constraints,
15211517
refresh,
15221518
no_deps,
@@ -1621,10 +1617,6 @@ impl PipCompileSettings {
16211617
only_binary,
16221618
extra,
16231619
all_extras: flag(all_extras, no_all_extras),
1624-
group: Some(group),
1625-
no_group: Some(no_group),
1626-
only_group: Some(only_group),
1627-
all_groups: Some(all_groups),
16281620
no_deps: flag(no_deps, deps),
16291621
output_file,
16301622
no_strip_extras: flag(no_strip_extras, strip_extras),
@@ -1767,10 +1759,6 @@ impl PipInstallSettings {
17671759
extra,
17681760
all_extras,
17691761
no_all_extras,
1770-
group,
1771-
no_group,
1772-
only_group,
1773-
all_groups,
17741762
installer,
17751763
refresh,
17761764
no_deps,
@@ -1866,10 +1854,6 @@ impl PipInstallSettings {
18661854
strict: flag(strict, no_strict),
18671855
extra,
18681856
all_extras: flag(all_extras, no_all_extras),
1869-
group: Some(group),
1870-
no_group: Some(no_group),
1871-
only_group: Some(only_group),
1872-
all_groups: Some(all_groups),
18731857
no_deps: flag(no_deps, deps),
18741858
python_version,
18751859
python_platform,
@@ -2655,10 +2639,6 @@ impl PipSettings {
26552639
extra,
26562640
all_extras,
26572641
no_extra,
2658-
group,
2659-
no_group,
2660-
only_group,
2661-
all_groups,
26622642
no_deps,
26632643
allow_empty_requirements,
26642644
resolution,
@@ -2780,11 +2760,11 @@ impl PipSettings {
27802760
false,
27812761
false,
27822762
false,
2783-
args.group.combine(group).unwrap_or_default(),
2784-
args.no_group.combine(no_group).unwrap_or_default(),
2763+
Vec::new(),
2764+
Vec::new(),
2765+
false,
2766+
Vec::new(),
27852767
false,
2786-
args.only_group.combine(only_group).unwrap_or_default(),
2787-
args.all_groups.combine(all_groups).unwrap_or_default(),
27882768
),
27892769
dependency_mode: if args.no_deps.combine(no_deps).unwrap_or_default() {
27902770
DependencyMode::Direct

0 commit comments

Comments
 (0)