mirror of https://github.com/astral-sh/uv
Add upper bound constraints to (more) test cases that use pytorch index (#11034)
Closes https://github.com/astral-sh/uv/issues/11025
This commit is contained in:
parent
0ae3fce599
commit
4b8e157ba7
|
|
@ -17624,7 +17624,7 @@ fn lock_multiple_sources_index_disjoint_markers() -> Result<()> {
|
||||||
name = "project"
|
name = "project"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
dependencies = ["jinja2>=3"]
|
dependencies = ["jinja2>=3,<3.1.4"]
|
||||||
|
|
||||||
[tool.uv]
|
[tool.uv]
|
||||||
constraint-dependencies = ["markupsafe<3"]
|
constraint-dependencies = ["markupsafe<3"]
|
||||||
|
|
@ -17673,7 +17673,7 @@ fn lock_multiple_sources_index_disjoint_markers() -> Result<()> {
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "jinja2"
|
name = "jinja2"
|
||||||
version = "3.1.4"
|
version = "3.1.3"
|
||||||
source = { registry = "https://download.pytorch.org/whl/cu118" }
|
source = { registry = "https://download.pytorch.org/whl/cu118" }
|
||||||
resolution-markers = [
|
resolution-markers = [
|
||||||
"sys_platform == 'win32'",
|
"sys_platform == 'win32'",
|
||||||
|
|
@ -17682,12 +17682,12 @@ fn lock_multiple_sources_index_disjoint_markers() -> Result<()> {
|
||||||
{ name = "markupsafe", marker = "sys_platform == 'win32'" },
|
{ name = "markupsafe", marker = "sys_platform == 'win32'" },
|
||||||
]
|
]
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://download.pytorch.org/whl/Jinja2-3.1.4-py3-none-any.whl" },
|
{ url = "https://download.pytorch.org/whl/Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "jinja2"
|
name = "jinja2"
|
||||||
version = "3.1.4"
|
version = "3.1.3"
|
||||||
source = { registry = "https://download.pytorch.org/whl/cu124" }
|
source = { registry = "https://download.pytorch.org/whl/cu124" }
|
||||||
resolution-markers = [
|
resolution-markers = [
|
||||||
"sys_platform != 'win32'",
|
"sys_platform != 'win32'",
|
||||||
|
|
@ -17696,7 +17696,7 @@ fn lock_multiple_sources_index_disjoint_markers() -> Result<()> {
|
||||||
{ name = "markupsafe", marker = "sys_platform != 'win32'" },
|
{ name = "markupsafe", marker = "sys_platform != 'win32'" },
|
||||||
]
|
]
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://download.pytorch.org/whl/Jinja2-3.1.4-py3-none-any.whl" },
|
{ url = "https://download.pytorch.org/whl/Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -17718,14 +17718,14 @@ fn lock_multiple_sources_index_disjoint_markers() -> Result<()> {
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = { virtual = "." }
|
source = { virtual = "." }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "jinja2", version = "3.1.4", source = { registry = "https://download.pytorch.org/whl/cu118" }, marker = "sys_platform == 'win32'" },
|
{ name = "jinja2", version = "3.1.3", source = { registry = "https://download.pytorch.org/whl/cu118" }, marker = "sys_platform == 'win32'" },
|
||||||
{ name = "jinja2", version = "3.1.4", source = { registry = "https://download.pytorch.org/whl/cu124" }, marker = "sys_platform != 'win32'" },
|
{ name = "jinja2", version = "3.1.3", source = { registry = "https://download.pytorch.org/whl/cu124" }, marker = "sys_platform != 'win32'" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.metadata]
|
[package.metadata]
|
||||||
requires-dist = [
|
requires-dist = [
|
||||||
{ name = "jinja2", marker = "sys_platform != 'win32'", specifier = ">=3", index = "https://download.pytorch.org/whl/cu124" },
|
{ name = "jinja2", marker = "sys_platform != 'win32'", specifier = ">=3,<3.1.4", index = "https://download.pytorch.org/whl/cu124" },
|
||||||
{ name = "jinja2", marker = "sys_platform == 'win32'", specifier = ">=3", index = "https://download.pytorch.org/whl/cu118" },
|
{ name = "jinja2", marker = "sys_platform == 'win32'", specifier = ">=3,<3.1.4", index = "https://download.pytorch.org/whl/cu118" },
|
||||||
]
|
]
|
||||||
"###
|
"###
|
||||||
);
|
);
|
||||||
|
|
@ -17755,7 +17755,7 @@ fn lock_multiple_sources_index_mixed() -> Result<()> {
|
||||||
name = "project"
|
name = "project"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
dependencies = ["jinja2>=3"]
|
dependencies = ["jinja2>=3,<3.1.4"]
|
||||||
|
|
||||||
[tool.uv]
|
[tool.uv]
|
||||||
constraint-dependencies = ["markupsafe<3"]
|
constraint-dependencies = ["markupsafe<3"]
|
||||||
|
|
@ -17800,7 +17800,7 @@ fn lock_multiple_sources_index_mixed() -> Result<()> {
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "jinja2"
|
name = "jinja2"
|
||||||
version = "3.1.4"
|
version = "3.1.3"
|
||||||
source = { registry = "https://download.pytorch.org/whl/cu118" }
|
source = { registry = "https://download.pytorch.org/whl/cu118" }
|
||||||
resolution-markers = [
|
resolution-markers = [
|
||||||
"sys_platform == 'win32'",
|
"sys_platform == 'win32'",
|
||||||
|
|
@ -17809,7 +17809,7 @@ fn lock_multiple_sources_index_mixed() -> Result<()> {
|
||||||
{ name = "markupsafe", marker = "sys_platform == 'win32'" },
|
{ name = "markupsafe", marker = "sys_platform == 'win32'" },
|
||||||
]
|
]
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://download.pytorch.org/whl/Jinja2-3.1.4-py3-none-any.whl" },
|
{ url = "https://download.pytorch.org/whl/Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -17851,14 +17851,14 @@ fn lock_multiple_sources_index_mixed() -> Result<()> {
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = { virtual = "." }
|
source = { virtual = "." }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "jinja2", version = "3.1.4", source = { registry = "https://download.pytorch.org/whl/cu118" }, marker = "sys_platform == 'win32'" },
|
{ name = "jinja2", version = "3.1.3", source = { registry = "https://download.pytorch.org/whl/cu118" }, marker = "sys_platform == 'win32'" },
|
||||||
{ name = "jinja2", version = "3.1.4", source = { url = "https://files.pythonhosted.org/packages/31/80/3a54838c3fb461f6fec263ebf3a3a41771bd05190238de3486aae8540c36/jinja2-3.1.4-py3-none-any.whl" }, marker = "sys_platform != 'win32'" },
|
{ name = "jinja2", version = "3.1.4", source = { url = "https://files.pythonhosted.org/packages/31/80/3a54838c3fb461f6fec263ebf3a3a41771bd05190238de3486aae8540c36/jinja2-3.1.4-py3-none-any.whl" }, marker = "sys_platform != 'win32'" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.metadata]
|
[package.metadata]
|
||||||
requires-dist = [
|
requires-dist = [
|
||||||
{ name = "jinja2", marker = "sys_platform != 'win32'", url = "https://files.pythonhosted.org/packages/31/80/3a54838c3fb461f6fec263ebf3a3a41771bd05190238de3486aae8540c36/jinja2-3.1.4-py3-none-any.whl" },
|
{ name = "jinja2", marker = "sys_platform != 'win32'", url = "https://files.pythonhosted.org/packages/31/80/3a54838c3fb461f6fec263ebf3a3a41771bd05190238de3486aae8540c36/jinja2-3.1.4-py3-none-any.whl" },
|
||||||
{ name = "jinja2", marker = "sys_platform == 'win32'", specifier = ">=3", index = "https://download.pytorch.org/whl/cu118" },
|
{ name = "jinja2", marker = "sys_platform == 'win32'", specifier = ">=3,<3.1.4", index = "https://download.pytorch.org/whl/cu118" },
|
||||||
]
|
]
|
||||||
"###
|
"###
|
||||||
);
|
);
|
||||||
|
|
@ -17888,7 +17888,7 @@ fn lock_multiple_sources_index_non_total() -> Result<()> {
|
||||||
name = "project"
|
name = "project"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
dependencies = ["jinja2>=3"]
|
dependencies = ["jinja2>=3,<3.1.4"]
|
||||||
|
|
||||||
[tool.uv.sources]
|
[tool.uv.sources]
|
||||||
jinja2 = [
|
jinja2 = [
|
||||||
|
|
@ -17908,7 +17908,7 @@ fn lock_multiple_sources_index_non_total() -> Result<()> {
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
Resolved 4 packages in [TIME]
|
Resolved 4 packages in [TIME]
|
||||||
error: Found duplicate package `jinja2==3.1.4 @ registry+https://download.pytorch.org/whl/cu118`
|
error: Found duplicate package `jinja2==3.1.3 @ registry+https://download.pytorch.org/whl/cu118`
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
||||||
|
|
@ -7555,21 +7555,31 @@ fn universal_platform_fork() -> Result<()> {
|
||||||
torch==2.5.1
|
torch==2.5.1
|
||||||
"})?;
|
"})?;
|
||||||
|
|
||||||
|
let constraints_txt = context.temp_dir.child("constraints.txt");
|
||||||
|
constraints_txt.write_str(indoc::indoc! {r"
|
||||||
|
jinja2<3.1.4
|
||||||
|
typing-extensions<4.12.2
|
||||||
|
"})?;
|
||||||
|
|
||||||
uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile()
|
uv_snapshot!(context.filters(), windows_filters=false, context.pip_compile()
|
||||||
.arg("requirements.in")
|
.arg("requirements.in")
|
||||||
.arg("--universal")
|
.arg("--universal")
|
||||||
|
.arg("-c")
|
||||||
|
.arg("constraints.txt")
|
||||||
.env_remove(EnvVars::UV_EXCLUDE_NEWER), @r###"
|
.env_remove(EnvVars::UV_EXCLUDE_NEWER), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
# This file was autogenerated by uv via the following command:
|
# This file was autogenerated by uv via the following command:
|
||||||
# uv pip compile --cache-dir [CACHE_DIR] requirements.in --universal
|
# uv pip compile --cache-dir [CACHE_DIR] requirements.in --universal -c constraints.txt
|
||||||
filelock==3.13.1
|
filelock==3.13.1
|
||||||
# via torch
|
# via torch
|
||||||
fsspec==2024.6.1
|
fsspec==2024.6.1
|
||||||
# via torch
|
# via torch
|
||||||
jinja2==3.1.4
|
jinja2==3.1.3
|
||||||
# via torch
|
# via
|
||||||
|
# -c constraints.txt
|
||||||
|
# torch
|
||||||
markupsafe==3.0.2
|
markupsafe==3.0.2
|
||||||
# via jinja2
|
# via jinja2
|
||||||
mpmath==1.3.0
|
mpmath==1.3.0
|
||||||
|
|
@ -7584,8 +7594,10 @@ fn universal_platform_fork() -> Result<()> {
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
torch==2.5.1+cpu ; (platform_machine != 'aarch64' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'linux')
|
torch==2.5.1+cpu ; (platform_machine != 'aarch64' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'linux')
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
typing-extensions==4.12.2
|
typing-extensions==4.9.0
|
||||||
# via torch
|
# via
|
||||||
|
# -c constraints.txt
|
||||||
|
# torch
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
Resolved 11 packages in [TIME]
|
Resolved 11 packages in [TIME]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue