mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Bump MSRV and rust-toolchain
version (#14303)
## Summary Per our versioning policy, we stay two versions back (and 1.88 was released today).
This commit is contained in:
parent
efc361223c
commit
56266447e2
9 changed files with 11 additions and 103 deletions
|
@ -12,7 +12,7 @@ resolver = "2"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
rust-version = "1.85"
|
rust-version = "1.86"
|
||||||
homepage = "https://pypi.org/project/uv/"
|
homepage = "https://pypi.org/project/uv/"
|
||||||
documentation = "https://pypi.org/project/uv/"
|
documentation = "https://pypi.org/project/uv/"
|
||||||
repository = "https://github.com/astral-sh/uv"
|
repository = "https://github.com/astral-sh/uv"
|
||||||
|
|
|
@ -37,7 +37,7 @@ disallowed-methods = [
|
||||||
"std::fs::soft_link",
|
"std::fs::soft_link",
|
||||||
"std::fs::symlink_metadata",
|
"std::fs::symlink_metadata",
|
||||||
"std::fs::write",
|
"std::fs::write",
|
||||||
"std::os::unix::fs::symlink",
|
{ path = "std::os::unix::fs::symlink", allow-invalid = true },
|
||||||
"std::os::windows::fs::symlink_dir",
|
{ path = "std::os::windows::fs::symlink_dir", allow-invalid = true },
|
||||||
"std::os::windows::fs::symlink_file",
|
{ path = "std::os::windows::fs::symlink_file", allow-invalid = true },
|
||||||
]
|
]
|
||||||
|
|
|
@ -17,7 +17,7 @@ fn get_binary_type(path: &Path) -> windows::core::Result<u32> {
|
||||||
.chain(Some(0))
|
.chain(Some(0))
|
||||||
.collect::<Vec<u16>>();
|
.collect::<Vec<u16>>();
|
||||||
// SAFETY: winapi call
|
// SAFETY: winapi call
|
||||||
unsafe { GetBinaryTypeW(PCWSTR(name.as_ptr()), &mut binary_type)? };
|
unsafe { GetBinaryTypeW(PCWSTR(name.as_ptr()), &raw mut binary_type)? };
|
||||||
Ok(binary_type)
|
Ok(binary_type)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1433,7 +1433,7 @@ pub(crate) fn is_windows_store_shim(path: &Path) -> bool {
|
||||||
0,
|
0,
|
||||||
buf.as_mut_ptr().cast(),
|
buf.as_mut_ptr().cast(),
|
||||||
buf.len() as u32 * 2,
|
buf.len() as u32 * 2,
|
||||||
&mut bytes_returned,
|
&raw mut bytes_returned,
|
||||||
std::ptr::null_mut(),
|
std::ptr::null_mut(),
|
||||||
) != 0
|
) != 0
|
||||||
};
|
};
|
||||||
|
|
|
@ -521,7 +521,7 @@ if __name__ == "__main__":
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[ignore]
|
#[ignore = "This test will spawn a GUI and wait until you close the window."]
|
||||||
fn gui_launcher() -> Result<()> {
|
fn gui_launcher() -> Result<()> {
|
||||||
// Create Temp Dirs
|
// Create Temp Dirs
|
||||||
let temp_dir = assert_fs::TempDir::new()?;
|
let temp_dir = assert_fs::TempDir::new()?;
|
||||||
|
|
|
@ -73,8 +73,8 @@ fn saleor() -> Result<()> {
|
||||||
// Currently ignored because the project doesn't build with `uv` yet.
|
// Currently ignored because the project doesn't build with `uv` yet.
|
||||||
//
|
//
|
||||||
// Source: https://github.com/apache/airflow/blob/c55438d9b2eb9b6680641eefdd0cbc67a28d1d29/pyproject.toml
|
// Source: https://github.com/apache/airflow/blob/c55438d9b2eb9b6680641eefdd0cbc67a28d1d29/pyproject.toml
|
||||||
#[ignore]
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[ignore = "Airflow doesn't build with `uv` yet"]
|
||||||
fn airflow() -> Result<()> {
|
fn airflow() -> Result<()> {
|
||||||
lock_ecosystem_package("3.12", "airflow")
|
lock_ecosystem_package("3.12", "airflow")
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,8 @@
|
||||||
use std::env::current_dir;
|
use std::env::current_dir;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::io::Cursor;
|
use std::io::Cursor;
|
||||||
use std::path::PathBuf;
|
|
||||||
|
|
||||||
use anyhow::{Context, Result, bail};
|
use anyhow::Result;
|
||||||
use assert_fs::prelude::*;
|
use assert_fs::prelude::*;
|
||||||
use flate2::write::GzEncoder;
|
use flate2::write::GzEncoder;
|
||||||
use fs_err::File;
|
use fs_err::File;
|
||||||
|
@ -4803,97 +4802,6 @@ fn compile_editable_url_requirement() -> Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[ignore]
|
|
||||||
fn cache_errors_are_non_fatal() -> Result<()> {
|
|
||||||
let context = TestContext::new("3.12");
|
|
||||||
let requirements_in = context.temp_dir.child("requirements.in");
|
|
||||||
// No git dep, git has its own locking strategy
|
|
||||||
requirements_in.write_str(indoc! {r"
|
|
||||||
# pypi wheel
|
|
||||||
pandas
|
|
||||||
# url wheel
|
|
||||||
flask @ https://files.pythonhosted.org/packages/36/42/015c23096649b908c809c69388a805a571a3bea44362fe87e33fc3afa01f/flask-3.0.0-py3-none-any.whl
|
|
||||||
# url source dist
|
|
||||||
werkzeug @ https://files.pythonhosted.org/packages/0d/cc/ff1904eb5eb4b455e442834dabf9427331ac0fa02853bf83db817a7dd53d/werkzeug-3.0.1.tar.gz
|
|
||||||
"
|
|
||||||
})?;
|
|
||||||
|
|
||||||
// Pick a file from each kind of cache
|
|
||||||
let interpreter_cache = context
|
|
||||||
.cache_dir
|
|
||||||
.path()
|
|
||||||
.join("interpreter-v0")
|
|
||||||
.read_dir()?
|
|
||||||
.next()
|
|
||||||
.context("Expected a python interpreter cache file")??
|
|
||||||
.path();
|
|
||||||
let cache_files = [
|
|
||||||
PathBuf::from("simple-v0/pypi/numpy.msgpack"),
|
|
||||||
PathBuf::from(
|
|
||||||
"wheels-v0/pypi/python-dateutil/python_dateutil-2.8.2-py2.py3-none-any.msgpack",
|
|
||||||
),
|
|
||||||
PathBuf::from("wheels-v0/url/4b8be67c801a7ecb/flask/flask-3.0.0-py3-none-any.msgpack"),
|
|
||||||
PathBuf::from("built-wheels-v0/url/6781bd6440ae72c2/werkzeug/metadata.msgpack"),
|
|
||||||
interpreter_cache,
|
|
||||||
];
|
|
||||||
|
|
||||||
let check = || {
|
|
||||||
uv_snapshot!(context.filters(), context.pip_compile()
|
|
||||||
.arg("pip")
|
|
||||||
.arg("compile")
|
|
||||||
.arg(requirements_in.path())
|
|
||||||
// It's sufficient to check that we resolve to a fix number of packages
|
|
||||||
.stdout(std::process::Stdio::null()), @r###"
|
|
||||||
success: true
|
|
||||||
exit_code: 0
|
|
||||||
----- stdout -----
|
|
||||||
|
|
||||||
----- stderr -----
|
|
||||||
Resolved 13 packages in [TIME]
|
|
||||||
"###
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
insta::allow_duplicates! {
|
|
||||||
check();
|
|
||||||
|
|
||||||
// Replace some cache files with invalid contents
|
|
||||||
for file in &cache_files {
|
|
||||||
let file = context.cache_dir.join(file);
|
|
||||||
if !file.is_file() {
|
|
||||||
bail!("Missing cache file {}", file.user_display());
|
|
||||||
}
|
|
||||||
fs_err::write(file, "I borken you cache")?;
|
|
||||||
}
|
|
||||||
|
|
||||||
check();
|
|
||||||
|
|
||||||
#[cfg(unix)]
|
|
||||||
{
|
|
||||||
use fs_err::os::unix::fs::OpenOptionsExt;
|
|
||||||
|
|
||||||
// Make some files unreadable, so that the read instead of the deserialization will fail
|
|
||||||
for file in cache_files {
|
|
||||||
let file = context.cache_dir.join(file);
|
|
||||||
if !file.is_file() {
|
|
||||||
bail!("Missing cache file {}", file.user_display());
|
|
||||||
}
|
|
||||||
|
|
||||||
fs_err::OpenOptions::new()
|
|
||||||
.create(true)
|
|
||||||
.write(true)
|
|
||||||
.mode(0o000)
|
|
||||||
.open(file)?;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
check();
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Resolve a distribution from an HTML-only registry.
|
/// Resolve a distribution from an HTML-only registry.
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(target_env = "musl"))] // No musllinux wheels in the torch index
|
#[cfg(not(target_env = "musl"))] // No musllinux wheels in the torch index
|
||||||
|
|
|
@ -2344,7 +2344,7 @@ fn install_git_private_https_pat_at_ref() {
|
||||||
/// See: <https://github.com/astral-sh/uv/issues/1980>.
|
/// See: <https://github.com/astral-sh/uv/issues/1980>.
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(feature = "git")]
|
#[cfg(feature = "git")]
|
||||||
#[ignore]
|
#[ignore = "Modifies the user's keyring"]
|
||||||
fn install_git_private_https_pat_and_username() {
|
fn install_git_private_https_pat_and_username() {
|
||||||
let context = TestContext::new(DEFAULT_PYTHON_VERSION);
|
let context = TestContext::new(DEFAULT_PYTHON_VERSION);
|
||||||
let token = decode_token(common::READ_ONLY_GITHUB_TOKEN);
|
let token = decode_token(common::READ_ONLY_GITHUB_TOKEN);
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "1.86"
|
channel = "1.88"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue