Skip to content

Commit 6849bab

Browse files
committed
Patch Ruff packages for RustPython release
Assisted-by: Codex:GPT-5
1 parent 9e4938c commit 6849bab

12 files changed

Lines changed: 682 additions & 1141 deletions

File tree

Cargo.lock

Lines changed: 645 additions & 1102 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,21 @@ ruff_markdown = { version = "0.0.11", path = "crates/ruff_markdown" }
2828
ruff_memory_usage = { version = "0.0.11", path = "crates/ruff_memory_usage" }
2929
ruff_notebook = { version = "0.0.11", path = "crates/ruff_notebook" }
3030
ruff_options_metadata = { version = "0.0.11", path = "crates/ruff_options_metadata" }
31-
ruff_python_ast = { version = "0.0.11", path = "crates/ruff_python_ast" }
31+
ruff_python_ast = { package = "rustpython-ruff_python_ast", version = "0.16.5", path = "crates/ruff_python_ast" }
3232
ruff_python_codegen = { version = "0.0.11", path = "crates/ruff_python_codegen" }
3333
ruff_python_formatter = { version = "0.0.11", path = "crates/ruff_python_formatter" }
3434
ruff_python_importer = { version = "0.0.11", path = "crates/ruff_python_importer" }
3535
ruff_python_index = { version = "0.0.11", path = "crates/ruff_python_index" }
3636
ruff_python_literal = { version = "0.0.11", path = "crates/ruff_python_literal" }
37-
ruff_python_parser = { version = "0.0.11", path = "crates/ruff_python_parser" }
37+
ruff_python_parser = { package = "rustpython-ruff_python_parser", version = "0.16.5", path = "crates/ruff_python_parser" }
3838
ruff_python_semantic = { version = "0.0.11", path = "crates/ruff_python_semantic" }
3939
ruff_python_stdlib = { version = "0.0.11", path = "crates/ruff_python_stdlib" }
40-
ruff_python_trivia = { version = "0.0.11", path = "crates/ruff_python_trivia" }
40+
ruff_python_trivia = { package = "rustpython-ruff_python_trivia", version = "0.16.5", path = "crates/ruff_python_trivia" }
4141
ruff_server = { version = "0.0.11", path = "crates/ruff_server" }
42-
ruff_source_file = { version = "0.0.11", path = "crates/ruff_source_file" }
42+
ruff_source_file = { package = "rustpython-ruff_source_file", version = "0.16.5", path = "crates/ruff_source_file" }
4343
ruff_mdtest = { path = "crates/ruff_mdtest" }
4444
ruff_ranged_value = { version = "0.0.11", path = "crates/ruff_ranged_value" }
45-
ruff_text_size = { version = "0.0.11", path = "crates/ruff_text_size" }
45+
ruff_text_size = { package = "rustpython-ruff_text_size", version = "0.16.5", path = "crates/ruff_text_size" }
4646
ruff_workspace = { version = "0.0.11", path = "crates/ruff_workspace" }
4747

4848
ty = { path = "crates/ty" }
@@ -291,9 +291,9 @@ codegen-units = 16
291291
# Some crates don't change as much but benefit more from
292292
# more expensive optimization passes, so we selectively
293293
# decrease codegen-units in some cases.
294-
[profile.release.package.ruff_python_parser]
294+
[profile.release.package.rustpython-ruff_python_parser]
295295
codegen-units = 1
296-
[profile.release.package.ruff_python_ast]
296+
[profile.release.package.rustpython-ruff_python_ast]
297297
codegen-units = 1
298298
[profile.release.package.salsa]
299299
codegen-units = 1
@@ -321,7 +321,7 @@ opt-level = 3
321321

322322
# Reduce complexity of a parser function that would trigger a locals limit in a wasm tool.
323323
# https://github.com/bytecodealliance/wasm-tools/blob/b5c3d98e40590512a3b12470ef358d5c7b983b15/crates/wasmparser/src/limits.rs#L29
324-
[profile.dev.package.ruff_python_parser]
324+
[profile.dev.package.rustpython-ruff_python_parser]
325325
opt-level = 1
326326

327327
# This profile is meant to mimic the `release` profile as closely as

crates/ruff_linter/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ruff_db = { workspace = true, features = ["junit", "serde"] }
1818
ruff_diagnostics = { workspace = true, features = ["serde"] }
1919
ruff_macros = { workspace = true }
2020
ruff_notebook = { workspace = true }
21-
ruff_python_ast = { workspace = true, features = ["serde", "cache"] }
21+
ruff_python_ast = { workspace = true }
2222
ruff_python_codegen = { workspace = true }
2323
ruff_python_importer = { workspace = true }
2424
ruff_python_index = { workspace = true }

crates/ruff_python_ast/Cargo.toml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2-
name = "ruff_python_ast"
3-
version = "0.0.11"
4-
description = "This is an internal component crate of Ruff"
2+
description = "Unofficial fork for RustPython"
3+
name = "rustpython-ruff_python_ast"
4+
version = "0.16.5"
55
authors = { workspace = true }
66
edition = { workspace = true }
77
rust-version = { workspace = true }
@@ -17,8 +17,8 @@ ignored = ["ruff_cache"]
1717
[lib]
1818

1919
[dependencies]
20-
ruff_cache = { workspace = true, optional = true }
21-
ruff_macros = { workspace = true, optional = true }
20+
# ruff_cache = { workspace = true, optional = true }
21+
# ruff_macros = { workspace = true, optional = true }
2222
ruff_python_trivia = { workspace = true }
2323
ruff_source_file = { workspace = true }
2424
ruff_text_size = { workspace = true }
@@ -41,15 +41,15 @@ thin-vec = { workspace = true }
4141

4242
[features]
4343
schemars = ["dep:schemars", "dep:serde_json"]
44-
cache = ["dep:ruff_cache", "dep:ruff_macros"]
45-
serde = [
46-
"dep:serde",
47-
"ruff_text_size/serde",
48-
"dep:ruff_cache",
49-
"char_str/serde",
50-
"compact_str/serde",
51-
"thin-vec/serde",
52-
]
44+
# cache = ["dep:ruff_cache", "dep:ruff_macros"]
45+
# serde = [
46+
# "dep:serde",
47+
# "ruff_text_size/serde",
48+
# "dep:ruff_cache",
49+
# "char_str/serde",
50+
# "compact_str/serde",
51+
# "thin-vec/serde",
52+
# ]
5353
get-size = ["dep:get-size2", "char_str/get-size", "ruff_text_size/get-size"]
5454
salsa = ["dep:salsa"]
5555

crates/ruff_python_ast/src/name.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ use crate::generated::ExprName;
3636
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
3737
#[cfg_attr(feature = "salsa", derive(salsa::SalsaValue))]
3838
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
39-
#[cfg_attr(feature = "cache", derive(ruff_macros::CacheKey))]
4039
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
4140
#[cfg_attr(
4241
feature = "schemars",

crates/ruff_python_ast/src/python_version.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use std::{fmt, str::FromStr};
44
///
55
/// N.B. This does not necessarily represent a Python version that we actually support.
66
#[derive(Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash)]
7-
#[cfg_attr(feature = "cache", derive(ruff_macros::CacheKey))]
87
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
98
pub struct PythonVersion {
109
pub major: u8,

crates/ruff_python_parser/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2-
name = "ruff_python_parser"
3-
version = "0.0.11"
4-
description = "This is an internal component crate of Ruff"
2+
description = "Unofficial fork for RustPython"
3+
name = "rustpython-ruff_python_parser"
4+
version = "0.16.5"
55
authors = ["Charlie Marsh <charlie.r.marsh@gmail.com>", "RustPython Team"]
66
edition = { workspace = true }
77
rust-version = { workspace = true }

crates/ruff_python_trivia/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2-
name = "ruff_python_trivia"
3-
version = "0.0.11"
4-
description = "This is an internal component crate of Ruff"
2+
description = "Unofficial fork for RustPython"
3+
name = "rustpython-ruff_python_trivia"
4+
version = "0.16.5"
55
authors = { workspace = true }
66
edition = { workspace = true }
77
rust-version = { workspace = true }

crates/ruff_source_file/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2-
name = "ruff_source_file"
3-
version = "0.0.11"
4-
description = "This is an internal component crate of Ruff"
2+
description = "Unofficial fork for RustPython"
3+
name = "rustpython-ruff_source_file"
4+
version = "0.16.5"
55
authors = { workspace = true }
66
edition = { workspace = true }
77
rust-version = { workspace = true }

crates/ruff_text_size/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2-
name = "ruff_text_size"
3-
version = "0.0.11"
4-
description = "This is an internal component crate of Ruff"
2+
description = "Unofficial fork for RustPython"
3+
name = "rustpython-ruff_text_size"
4+
version = "0.16.5"
55
authors = { workspace = true }
66
edition = { workspace = true }
77
rust-version = { workspace = true }

0 commit comments

Comments
 (0)