mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Add cargo shear CI step (#7461)
* Add `cargo shear` CI step * Remove some deps * Move `ruff_python_parser` to dev deps * Remove `thread_local` crate * Cleanup `num-integer` usage * Remove parser fro. wasm * Remove windows-sys from venv launcher * Update lock * Resolve more * Fix wasm * Update lock
This commit is contained in:
1 parent
33b024b70e
commit
2e777a6fb3
8 files changed
+19
-40
No files matched your search
@@ -557,3 +557,17 @@ jobs:
|
||||
run: wasmer run --dir $(pwd) target/wasm32-wasip1/release/rustpython.wasm -- "$(pwd)/extra_tests/snippets/stdlib_random.py"
|
||||
- name: run cpython unittest
|
||||
run: wasmer run --dir $(pwd) target/wasm32-wasip1/release/rustpython.wasm -- "$(pwd)/Lib/test/test_int.py"
|
||||
|
||||
cargo-shear:
|
||||
name: cargo shear
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: cargo-bins/cargo-binstall@1800853f2578f8c34492ec76154caef8e163fbca # v1.17.7
|
||||
|
||||
- run: cargo binstall --no-confirm cargo-shear
|
||||
|
||||
- run: cargo shear
|
||||
Generated
-17
@@ -3299,7 +3299,6 @@ dependencies = [
|
||||
"mt19937",
|
||||
"nix 0.30.1",
|
||||
"num-complex",
|
||||
"num-integer",
|
||||
"num-traits",
|
||||
"num_enum",
|
||||
"oid-registry",
|
||||
@@ -3342,9 +3341,7 @@ dependencies = [
|
||||
"unic-ucd-age",
|
||||
"unic-ucd-bidi",
|
||||
"unic-ucd-category",
|
||||
"unic-ucd-ident",
|
||||
"unicode-bidi-mirroring",
|
||||
"unicode-casing",
|
||||
"unicode_names2 2.0.0",
|
||||
"uuid",
|
||||
"webpki-roots",
|
||||
@@ -3358,9 +3355,6 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "rustpython-venvlauncher"
|
||||
version = "0.5.0"
|
||||
dependencies = [
|
||||
"windows-sys 0.61.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustpython-vm"
|
||||
@@ -3424,7 +3418,6 @@ dependencies = [
|
||||
"strum",
|
||||
"strum_macros",
|
||||
"thiserror 2.0.18",
|
||||
"thread_local",
|
||||
"timsort",
|
||||
"uname",
|
||||
"unic-ucd-bidi",
|
||||
@@ -3453,7 +3446,6 @@ version = "0.5.0"
|
||||
dependencies = [
|
||||
"console_error_panic_hook",
|
||||
"js-sys",
|
||||
"ruff_python_parser",
|
||||
"rustpython-common",
|
||||
"rustpython-pylib",
|
||||
"rustpython-stdlib",
|
||||
@@ -3944,15 +3936,6 @@ dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thread_local"
|
||||
version = "1.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.3.47"
|
||||
|
||||
+1
-3
@@ -35,7 +35,6 @@ rustpython-compiler = { workspace = true }
|
||||
rustpython-pylib = { workspace = true, optional = true }
|
||||
rustpython-stdlib = { workspace = true, optional = true, features = ["compiler"] }
|
||||
rustpython-vm = { workspace = true, features = ["compiler", "gc"] }
|
||||
ruff_python_parser = { workspace = true }
|
||||
|
||||
cfg-if = { workspace = true }
|
||||
log = { workspace = true }
|
||||
@@ -56,6 +55,7 @@ rustyline = { workspace = true }
|
||||
criterion = { workspace = true }
|
||||
pyo3 = { version = "0.28.2", features = ["auto-initialize"] }
|
||||
rustpython-stdlib = { workspace = true }
|
||||
ruff_python_parser = { workspace = true }
|
||||
|
||||
[[bench]]
|
||||
name = "execution"
|
||||
@@ -169,7 +169,6 @@ ascii = "1.1"
|
||||
bitflags = "2.11.0"
|
||||
bitflagset = "0.0.3"
|
||||
bstr = "1"
|
||||
bytes = "1.11.1"
|
||||
cfg-if = "1.0"
|
||||
chrono = { version = "0.4.44", default-features = false, features = ["clock", "oldtime", "std"] }
|
||||
constant_time_eq = "0.4"
|
||||
@@ -216,7 +215,6 @@ strum = "0.27"
|
||||
strum_macros = "0.28"
|
||||
syn = "2"
|
||||
thiserror = "2.0"
|
||||
thread_local = "1.1.9"
|
||||
unicode-casing = "0.1.1"
|
||||
unic-char-property = "0.9.0"
|
||||
unic-normal = "0.9.0"
|
||||
|
||||
@@ -48,7 +48,6 @@ libc = { workspace = true }
|
||||
nix = { workspace = true }
|
||||
num-complex = { workspace = true }
|
||||
malachite-bigint = { workspace = true }
|
||||
num-integer = { workspace = true }
|
||||
num-traits = { workspace = true }
|
||||
num_enum = { workspace = true }
|
||||
parking_lot = { workspace = true }
|
||||
@@ -78,16 +77,12 @@ constant_time_eq = { workspace = true }
|
||||
|
||||
## unicode stuff
|
||||
unicode_names2 = { workspace = true }
|
||||
# TODO: use unic for this; needed for title case:
|
||||
# https://github.com/RustPython/RustPython/pull/832#discussion_r275428939
|
||||
unicode-casing = { workspace = true }
|
||||
# update version all at the same time
|
||||
unic-char-property = { workspace = true }
|
||||
unic-normal = { workspace = true }
|
||||
unic-ucd-bidi = { workspace = true }
|
||||
unic-ucd-category = { workspace = true }
|
||||
unic-ucd-age = { workspace = true }
|
||||
unic-ucd-ident = { workspace = true }
|
||||
ucd = "0.1.1"
|
||||
unicode-bidi-mirroring = { workspace = true }
|
||||
|
||||
|
||||
@@ -13,15 +13,5 @@ license.workspace = true
|
||||
name = "venvlaunchert"
|
||||
path = "src/main.rs"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
windows-sys = { workspace = true, features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_System_Threading",
|
||||
"Win32_System_Environment",
|
||||
"Win32_Storage_FileSystem",
|
||||
"Win32_System_Console",
|
||||
"Win32_Security",
|
||||
] }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
@@ -72,7 +72,6 @@ static_assertions = { workspace = true }
|
||||
strum = { workspace = true }
|
||||
strum_macros = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
thread_local = { workspace = true }
|
||||
memchr = { workspace = true }
|
||||
|
||||
caseless = "0.2.2"
|
||||
|
||||
@@ -24,7 +24,7 @@ use core::cell::Cell;
|
||||
use core::ops::{Neg, Not};
|
||||
use core::ptr::NonNull;
|
||||
use malachite_bigint::{BigInt, Sign};
|
||||
use num_integer::Integer;
|
||||
use num_integer::{ExtendedGcd, Integer};
|
||||
use num_traits::{One, Pow, PrimInt, Signed, ToPrimitive, Zero};
|
||||
|
||||
#[pyclass(module = false, name = "int")]
|
||||
@@ -414,7 +414,6 @@ impl PyInt {
|
||||
if a.is_negative() { a + n } else { a }
|
||||
}
|
||||
fn inverse(a: BigInt, n: &BigInt) -> Option<BigInt> {
|
||||
use num_integer::*;
|
||||
let ExtendedGcd { gcd, x: c, .. } = a.extended_gcd(n);
|
||||
if gcd.is_one() {
|
||||
Some(normalize(c, n))
|
||||
|
||||
@@ -23,8 +23,6 @@ rustpython-stdlib = { workspace = true, default-features = false, optional = tru
|
||||
# make sure no threading! otherwise wasm build will fail
|
||||
rustpython-vm = { workspace = true, features = ["compiler", "encodings", "serde", "wasmbind"] }
|
||||
|
||||
ruff_python_parser = { workspace = true }
|
||||
|
||||
serde = { workspace = true }
|
||||
wasm-bindgen = { workspace = true }
|
||||
|
||||
@@ -48,3 +46,6 @@ wasm-opt = false#["-O1"]
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[package.metadata.cargo-shear]
|
||||
ignored = ["serde", "rustpython-common"]
|
||||
Reference in new issue
Block a user