From e66afa8767c00b6d2761efa23af3e78dc207bfcd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 23:01:49 +0000 Subject: [PATCH] Bump insta from 1.35.1 to 1.36.1 (#2180) --- Cargo.lock | 4 ++-- crates/distribution-filename/Cargo.toml | 2 +- crates/distribution-filename/src/wheel.rs | 18 +++++++++--------- crates/pypi-types/Cargo.toml | 2 +- crates/requirements-txt/Cargo.toml | 2 +- crates/requirements-txt/src/lib.rs | 14 +++++++------- crates/uv-build/Cargo.toml | 2 +- crates/uv-build/src/lib.rs | 8 ++++---- crates/uv-client/Cargo.toml | 2 +- crates/uv-client/src/html.rs | 8 ++++---- crates/uv-interpreter/Cargo.toml | 2 +- crates/uv-interpreter/src/python_query.rs | 10 ++++------ crates/uv-resolver/Cargo.toml | 2 +- crates/uv/Cargo.toml | 2 +- crates/uv/src/version.rs | 8 ++++---- 15 files changed, 42 insertions(+), 44 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bc13691e4..cbe391101 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1532,9 +1532,9 @@ checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" [[package]] name = "insta" -version = "1.35.1" +version = "1.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c985c1bef99cf13c58fade470483d81a2bfe846ebde60ed28cc2dddec2df9e2" +checksum = "0a7c22c4d34ef4788c351e971c52bfdfe7ea2766f8c5466bc175dd46e52ac22e" dependencies = [ "console", "lazy_static", diff --git a/crates/distribution-filename/Cargo.toml b/crates/distribution-filename/Cargo.toml index 18e2eac63..ba8e375c6 100644 --- a/crates/distribution-filename/Cargo.toml +++ b/crates/distribution-filename/Cargo.toml @@ -26,4 +26,4 @@ thiserror = { workspace = true } url = { workspace = true } [dev-dependencies] -insta = { version = "1.35.1" } +insta = { version = "1.36.1" } diff --git a/crates/distribution-filename/src/wheel.rs b/crates/distribution-filename/src/wheel.rs index 7e5dcfe5f..8446d2679 100644 --- a/crates/distribution-filename/src/wheel.rs +++ b/crates/distribution-filename/src/wheel.rs @@ -234,56 +234,56 @@ mod tests { #[test] fn err_not_whl_extension() { let err = WheelFilename::from_str("foo.rs").unwrap_err(); - insta::assert_display_snapshot!(err, @r###"The wheel filename "foo.rs" is invalid: Must end with .whl"###); + insta::assert_snapshot!(err, @r###"The wheel filename "foo.rs" is invalid: Must end with .whl"###); } #[test] fn err_1_part_empty() { let err = WheelFilename::from_str(".whl").unwrap_err(); - insta::assert_display_snapshot!(err, @r###"The wheel filename ".whl" is invalid: Must have a version"###); + insta::assert_snapshot!(err, @r###"The wheel filename ".whl" is invalid: Must have a version"###); } #[test] fn err_1_part_no_version() { let err = WheelFilename::from_str("foo.whl").unwrap_err(); - insta::assert_display_snapshot!(err, @r###"The wheel filename "foo.whl" is invalid: Must have a version"###); + insta::assert_snapshot!(err, @r###"The wheel filename "foo.whl" is invalid: Must have a version"###); } #[test] fn err_2_part_no_pythontag() { let err = WheelFilename::from_str("foo-version.whl").unwrap_err(); - insta::assert_display_snapshot!(err, @r###"The wheel filename "foo-version.whl" is invalid: Must have a Python tag"###); + insta::assert_snapshot!(err, @r###"The wheel filename "foo-version.whl" is invalid: Must have a Python tag"###); } #[test] fn err_3_part_no_abitag() { let err = WheelFilename::from_str("foo-version-python.whl").unwrap_err(); - insta::assert_display_snapshot!(err, @r###"The wheel filename "foo-version-python.whl" is invalid: Must have an ABI tag"###); + insta::assert_snapshot!(err, @r###"The wheel filename "foo-version-python.whl" is invalid: Must have an ABI tag"###); } #[test] fn err_4_part_no_platformtag() { let err = WheelFilename::from_str("foo-version-python-abi.whl").unwrap_err(); - insta::assert_display_snapshot!(err, @r###"The wheel filename "foo-version-python-abi.whl" is invalid: Must have a platform tag"###); + insta::assert_snapshot!(err, @r###"The wheel filename "foo-version-python-abi.whl" is invalid: Must have a platform tag"###); } #[test] fn err_too_many_parts() { let err = WheelFilename::from_str("foo-1.2.3-build-python-abi-platform-oops.whl").unwrap_err(); - insta::assert_display_snapshot!(err, @r###"The wheel filename "foo-1.2.3-build-python-abi-platform-oops.whl" is invalid: Must have 5 or 6 components, but has more"###); + insta::assert_snapshot!(err, @r###"The wheel filename "foo-1.2.3-build-python-abi-platform-oops.whl" is invalid: Must have 5 or 6 components, but has more"###); } #[test] fn err_invalid_package_name() { let err = WheelFilename::from_str("f!oo-1.2.3-python-abi-platform.whl").unwrap_err(); - insta::assert_display_snapshot!(err, @r###"The wheel filename "f!oo-1.2.3-python-abi-platform.whl" has an invalid package name"###); + insta::assert_snapshot!(err, @r###"The wheel filename "f!oo-1.2.3-python-abi-platform.whl" has an invalid package name"###); } #[test] fn err_invalid_version() { let err = WheelFilename::from_str("foo-x.y.z-python-abi-platform.whl").unwrap_err(); - insta::assert_display_snapshot!(err, @r###"The wheel filename "foo-x.y.z-python-abi-platform.whl" has an invalid version part: expected version to start with a number, but no leading ASCII digits were found"###); + insta::assert_snapshot!(err, @r###"The wheel filename "foo-x.y.z-python-abi-platform.whl" has an invalid version part: expected version to start with a number, but no leading ASCII digits were found"###); } #[test] diff --git a/crates/pypi-types/Cargo.toml b/crates/pypi-types/Cargo.toml index 303709355..d5ef8bf71 100644 --- a/crates/pypi-types/Cargo.toml +++ b/crates/pypi-types/Cargo.toml @@ -29,7 +29,7 @@ url = { workspace = true } [dev-dependencies] indoc = { version = "2.0.4" } -insta = { version = "1.35.1" } +insta = { version = "1.36.1" } serde_json = { version = "1.0.114" } tempfile = { version = "3.9.0" } test-case = { version = "3.3.1" } diff --git a/crates/requirements-txt/Cargo.toml b/crates/requirements-txt/Cargo.toml index df3fd99eb..0a3f24c2a 100644 --- a/crates/requirements-txt/Cargo.toml +++ b/crates/requirements-txt/Cargo.toml @@ -32,7 +32,7 @@ url = { workspace = true } anyhow = { version = "1.0.80" } assert_fs = { version = "1.1.1" } indoc = { version = "2.0.4" } -insta = { version = "1.35.1", features = ["filters"] } +insta = { version = "1.36.1", features = ["filters"] } itertools = { version = "0.12.1" } serde_json = { version = "1.0.114" } tempfile = { version = "3.9.0" } diff --git a/crates/requirements-txt/src/lib.rs b/crates/requirements-txt/src/lib.rs index 83a6dbeec..7b955fb0c 100644 --- a/crates/requirements-txt/src/lib.rs +++ b/crates/requirements-txt/src/lib.rs @@ -1121,7 +1121,7 @@ mod test { insta::with_settings!({ filters => filters, }, { - insta::assert_display_snapshot!(errors, @r###" + insta::assert_snapshot!(errors, @r###" Error parsing included file in `` at position 0 failed to open file `` "###); @@ -1150,7 +1150,7 @@ mod test { insta::with_settings!({ filters => filters }, { - insta::assert_display_snapshot!(errors, @r###" + insta::assert_snapshot!(errors, @r###" Couldn't parse requirement in `` at position 0 Expected an alphanumeric character starting the extra name, found 'ö' numpy[ö]==1.29 @@ -1181,7 +1181,7 @@ mod test { insta::with_settings!({ filters => filters }, { - insta::assert_display_snapshot!(errors, @"Unsupported URL (expected a `file://` scheme) in ``: `http://localhost:8080/`"); + insta::assert_snapshot!(errors, @"Unsupported URL (expected a `file://` scheme) in ``: `http://localhost:8080/`"); }); Ok(()) @@ -1204,7 +1204,7 @@ mod test { insta::with_settings!({ filters => filters }, { - insta::assert_display_snapshot!(errors, @r###" + insta::assert_snapshot!(errors, @r###" Couldn't parse requirement in `` at position 6 Expected either alphanumerical character (starting the extra name) or ']' (ending the extras section), found ',' black[,abcdef] @@ -1235,7 +1235,7 @@ mod test { insta::with_settings!({ filters => filters }, { - insta::assert_display_snapshot!(errors, @r###" + insta::assert_snapshot!(errors, @r###" Invalid URL in `` at position 0: `123` relative URL without a base "###); @@ -1269,7 +1269,7 @@ mod test { insta::with_settings!({ filters => filters }, { - insta::assert_display_snapshot!(errors, @"Requirement `file.txt` in `` looks like a requirements file but was passed as a package name. Did you mean `-r file.txt`?"); + insta::assert_snapshot!(errors, @"Requirement `file.txt` in `` looks like a requirements file but was passed as a package name. Did you mean `-r file.txt`?"); }); Ok(()) @@ -1369,7 +1369,7 @@ mod test { insta::with_settings!({ filters => filters }, { - insta::assert_display_snapshot!(errors, @r###" + insta::assert_snapshot!(errors, @r###" Unexpected '-', expected '-c', '-e', '-r' or the start of a requirement at :2:3 "###); }); diff --git a/crates/uv-build/Cargo.toml b/crates/uv-build/Cargo.toml index a52143e94..63dcfafa7 100644 --- a/crates/uv-build/Cargo.toml +++ b/crates/uv-build/Cargo.toml @@ -41,4 +41,4 @@ tracing = { workspace = true } rustc-hash = { workspace = true } [dev-dependencies] -insta = { version = "1.35.1" } +insta = { version = "1.36.1" } diff --git a/crates/uv-build/src/lib.rs b/crates/uv-build/src/lib.rs index be7491b9a..2116a13bd 100644 --- a/crates/uv-build/src/lib.rs +++ b/crates/uv-build/src/lib.rs @@ -968,7 +968,7 @@ mod test { "pygraphviz-1.11", ); assert!(matches!(err, Error::MissingHeader { .. })); - insta::assert_display_snapshot!(err, @r###" + insta::assert_snapshot!(err, @r###" Failed building wheel through setup.py: --- stdout: running bdist_wheel @@ -988,7 +988,7 @@ mod test { error: command '/usr/bin/gcc' failed with exit code 1 --- "###); - insta::assert_display_snapshot!( + insta::assert_snapshot!( std::error::Error::source(&err).unwrap(), @r###"This error likely indicates that you need to install a library that provides "graphviz/cgraph.h" for pygraphviz-1.11"### ); @@ -1018,7 +1018,7 @@ mod test { "pygraphviz-1.11", ); assert!(matches!(err, Error::MissingHeader { .. })); - insta::assert_display_snapshot!(err, @r###" + insta::assert_snapshot!(err, @r###" Failed building wheel through setup.py: --- stdout: @@ -1030,7 +1030,7 @@ mod test { error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 --- "###); - insta::assert_display_snapshot!( + insta::assert_snapshot!( std::error::Error::source(&err).unwrap(), @"This error likely indicates that you need to install the library that provides a shared library for ncurses for pygraphviz-1.11 (e.g. libncurses-dev)" ); diff --git a/crates/uv-client/Cargo.toml b/crates/uv-client/Cargo.toml index 3096c8477..c1bb9f877 100644 --- a/crates/uv-client/Cargo.toml +++ b/crates/uv-client/Cargo.toml @@ -50,5 +50,5 @@ urlencoding = { workspace = true } [dev-dependencies] anyhow = { workspace = true } hyper = { version = "0.14.28", features = ["server", "http1"] } -insta = { version = "1.35.1" } +insta = { version = "1.36.1" } tokio = { workspace = true, features = ["fs", "macros"] } diff --git a/crates/uv-client/src/html.rs b/crates/uv-client/src/html.rs index 2d1a47c4c..84847ed38 100644 --- a/crates/uv-client/src/html.rs +++ b/crates/uv-client/src/html.rs @@ -569,7 +569,7 @@ mod tests { "; let base = Url::parse("https://download.pytorch.org/whl/jinja2/").unwrap(); let result = SimpleHtml::parse(text, &base).unwrap_err(); - insta::assert_display_snapshot!(result, @"Missing href attribute on anchor link"); + insta::assert_snapshot!(result, @"Missing href attribute on anchor link"); } #[test] @@ -586,7 +586,7 @@ mod tests { "#; let base = Url::parse("https://download.pytorch.org/whl/jinja2/").unwrap(); let result = SimpleHtml::parse(text, &base).unwrap_err(); - insta::assert_display_snapshot!(result, @"Missing href attribute on anchor link"); + insta::assert_snapshot!(result, @"Missing href attribute on anchor link"); } #[test] @@ -655,7 +655,7 @@ mod tests { "#; let base = Url::parse("https://download.pytorch.org/whl/jinja2/").unwrap(); let result = SimpleHtml::parse(text, &base).unwrap_err(); - insta::assert_display_snapshot!(result, @"Unexpected fragment (expected `#sha256=...`) on URL: sha256"); + insta::assert_snapshot!(result, @"Unexpected fragment (expected `#sha256=...`) on URL: sha256"); } #[test] @@ -672,7 +672,7 @@ mod tests { "#; let base = Url::parse("https://download.pytorch.org/whl/jinja2/").unwrap(); let result = SimpleHtml::parse(text, &base).unwrap_err(); - insta::assert_display_snapshot!(result, @"Unsupported hash algorithm (expected `sha256`) on: sha512=6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"); + insta::assert_snapshot!(result, @"Unsupported hash algorithm (expected `sha256`) on: sha512=6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"); } #[test] diff --git a/crates/uv-interpreter/Cargo.toml b/crates/uv-interpreter/Cargo.toml index 22c6e8176..b93ef3b9c 100644 --- a/crates/uv-interpreter/Cargo.toml +++ b/crates/uv-interpreter/Cargo.toml @@ -39,6 +39,6 @@ which = { workspace = true} [dev-dependencies] anyhow = { version = "1.0.80" } indoc = { version = "2.0.4" } -insta = { version = "1.35.1" } +insta = { version = "1.36.1" } itertools = { version = "0.12.1" } tempfile = { version = "3.9.0" } diff --git a/crates/uv-interpreter/src/python_query.rs b/crates/uv-interpreter/src/python_query.rs index ebddb2f64..3984e5ae0 100644 --- a/crates/uv-interpreter/src/python_query.rs +++ b/crates/uv-interpreter/src/python_query.rs @@ -430,7 +430,7 @@ mod windows { mod tests { use std::fmt::Debug; - use insta::assert_display_snapshot; + use insta::assert_snapshot; use itertools::Itertools; use platform_host::Platform; @@ -457,7 +457,7 @@ mod windows { (r"Caused by: .* \(os error 3\)", "Caused by: The system cannot find the path specified. (os error 3)") ] }, { - assert_display_snapshot!( + assert_snapshot!( format_err(result), @r###" failed to canonicalize path `C:\does\not\exists\python3.12` Caused by: The system cannot find the path specified. (os error 3) @@ -470,8 +470,6 @@ mod windows { #[cfg(unix)] #[cfg(test)] mod tests { - use insta::assert_display_snapshot; - #[cfg(unix)] use insta::assert_snapshot; use itertools::Itertools; @@ -513,7 +511,7 @@ mod tests { ) .unwrap() .ok_or(Error::NoSuchPython(request.to_string())); - assert_display_snapshot!( + assert_snapshot!( format_err(result), @"No Python python3.1000 In `PATH`. Is Python python3.1000 installed?" ); @@ -526,7 +524,7 @@ mod tests { &Platform::current().unwrap(), &Cache::temp().unwrap(), ); - assert_display_snapshot!( + assert_snapshot!( format_err(result), @r###" failed to canonicalize path `/does/not/exists/python3.12` Caused by: No such file or directory (os error 2) diff --git a/crates/uv-resolver/Cargo.toml b/crates/uv-resolver/Cargo.toml index a62443711..07c94012c 100644 --- a/crates/uv-resolver/Cargo.toml +++ b/crates/uv-resolver/Cargo.toml @@ -66,7 +66,7 @@ uv-virtualenv = { path = "../uv-virtualenv" } uv-interpreter = { path = "../uv-interpreter" } once_cell = { version = "1.19.0" } -insta = { version = "1.35.1" } +insta = { version = "1.36.1" } [features] default = ["pypi"] diff --git a/crates/uv/Cargo.toml b/crates/uv/Cargo.toml index 993a7e020..55dd7c67c 100644 --- a/crates/uv/Cargo.toml +++ b/crates/uv/Cargo.toml @@ -84,7 +84,7 @@ assert_cmd = { version = "2.0.14" } assert_fs = { version = "1.1.0" } filetime = { version = "0.2.23" } indoc = { version = "2.0.4" } -insta = { version = "1.35.1", features = ["filters", "json"] } +insta = { version = "1.36.1", features = ["filters", "json"] } predicates = { version = "3.0.4" } regex = { version = "1.10.3" } reqwest = { version = "0.11.23", features = ["blocking"], default-features = false } diff --git a/crates/uv/src/version.rs b/crates/uv/src/version.rs index 02bdd7744..449a6ca6f 100644 --- a/crates/uv/src/version.rs +++ b/crates/uv/src/version.rs @@ -76,7 +76,7 @@ pub(crate) fn version() -> VersionInfo { #[cfg(test)] mod tests { - use insta::{assert_display_snapshot, assert_json_snapshot}; + use insta::{assert_json_snapshot, assert_snapshot}; use super::{CommitInfo, VersionInfo}; @@ -86,7 +86,7 @@ mod tests { version: "0.0.0".to_string(), commit_info: None, }; - assert_display_snapshot!(version, @"0.0.0"); + assert_snapshot!(version, @"0.0.0"); } #[test] @@ -101,7 +101,7 @@ mod tests { commits_since_last_tag: 0, }), }; - assert_display_snapshot!(version, @"0.0.0 (53b0f5d92 2023-10-19)"); + assert_snapshot!(version, @"0.0.0 (53b0f5d92 2023-10-19)"); } #[test] @@ -116,7 +116,7 @@ mod tests { commits_since_last_tag: 24, }), }; - assert_display_snapshot!(version, @"0.0.0+24 (53b0f5d92 2023-10-19)"); + assert_snapshot!(version, @"0.0.0+24 (53b0f5d92 2023-10-19)"); } #[test]