Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Rust crate ureq to v3 #15759

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 64 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 12 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,12 @@ serde_with = { version = "3.6.0", default-features = false, features = [
shellexpand = { version = "3.0.0" }
similar = { version = "2.4.0", features = ["inline"] }
smallvec = { version = "1.13.2" }
snapbox = { version = "0.6.0", features = ["diff", "term-svg", "cmd", "examples"] }
snapbox = { version = "0.6.0", features = [
"diff",
"term-svg",
"cmd",
"examples",
] }
static_assertions = "1.1.0"
strum = { version = "0.26.0", features = ["strum_macros"] }
strum_macros = { version = "0.26.0" }
Expand All @@ -159,7 +164,7 @@ unicode-ident = { version = "1.0.12" }
unicode-width = { version = "0.2.0" }
unicode_names2 = { version = "1.2.2" }
unicode-normalization = { version = "0.1.23" }
ureq = { version = "2.9.6" }
ureq = { version = "3.0.3" }
url = { version = "2.5.0" }
uuid = { version = "1.6.1", features = [
"v4",
Expand Down Expand Up @@ -305,7 +310,11 @@ local-artifacts-jobs = ["./build-binaries", "./build-docker"]
# Publish jobs to run in CI
publish-jobs = ["./publish-pypi", "./publish-wasm"]
# Post-announce jobs to run in CI
post-announce-jobs = ["./notify-dependents", "./publish-docs", "./publish-playground"]
post-announce-jobs = [
"./notify-dependents",
"./publish-docs",
"./publish-playground",
]
# Custom permissions for GitHub Jobs
github-custom-job-permissions = { "build-docker" = { packages = "write", contents = "read" }, "publish-wasm" = { contents = "read", id-token = "write", packages = "write" } }
# Whether to install an updater program
Expand Down
5 changes: 5 additions & 0 deletions crates/ruff_benchmark/benches/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ fn benchmark_lexer(criterion: &mut Criterion<WallTime>) {
_ => {}
}
}

assert!(
lexer.finish().is_empty(),
"Input to be valid python source code"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Input to be valid python source code"
"Input should be valid python source code"

);
});
},
);
Expand Down
8 changes: 7 additions & 1 deletion crates/ruff_benchmark/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,13 @@ impl TestFile {
// File not yet cached, download and cache it in the target directory
let response = ureq::get(url.as_str()).call()?;

let content = response.into_string()?;
// Using `with_config` here because without, the `loosy_utf8` results in invalid
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Using `with_config` here because without, the `loosy_utf8` results in invalid
// Using `with_config` here because without, the `lossy_utf8` results in invalid

// UTF8 for unknown reasons
let content = response
.into_body()
.with_config()
.limit(10 * 1024 * 1024)
.read_to_string()?;

// SAFETY: There's always the `target` directory
let parent = cached_filename.parent().unwrap();
Expand Down
Loading