Skip to content

Commit acc167f

Browse files
authored
Move dependencies to workspace for stdlib crate (RustPython#7747)
* Add dependencies from `stdlib` crate to workspace * Declare dependencies as workspace = true
1 parent c2910c0 commit acc167f

2 files changed

Lines changed: 96 additions & 49 deletions

File tree

Cargo.toml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,24 +172,38 @@ ruff_source_file = { package = "rustpython-ruff_source_file", version = "0.15.8"
172172

173173
der = { version = "0.8", features = ["alloc", "oid", "pem", "zeroize"] }
174174
phf = { version = "0.13.1", default-features = false, features = ["macros"]}
175+
adler32 = "1.2.0"
175176
ahash = "0.8.12"
176177
approx = "0.5.1"
177178
ascii = "1.1"
179+
aws-lc-rs = "1.16.3"
180+
base64 = "0.22"
181+
blake2 = "0.10.4"
178182
bitflags = "2.11.0"
179183
bitflagset = "0.0.3"
180184
bstr = "1"
185+
bzip2 = "0.6"
181186
chrono = { version = "0.4.44", default-features = false, features = ["clock", "oldtime", "std"] }
182187
constant_time_eq = "0.4"
183188
cranelift = "0.131.0"
184189
cranelift-jit = "0.131.0"
185190
cranelift-module = "0.131.0"
191+
crc32fast = "1.3.2"
186192
criterion = { version = "0.8", features = ["html_reports"] }
187193
crossbeam-utils = "0.8.21"
194+
csv-core = "0.1.11"
195+
digest = "0.10.7"
196+
dns-lookup = "3.0"
197+
dyn-clone = "1.0.10"
188198
flame = "0.2.2"
199+
flate2 = { version = "1.1.9", default-features = false }
200+
foreign-types-shared = "0.3.1"
201+
gethostname = "1.0.2"
189202
getrandom = { version = "0.3", features = ["std"] }
190203
glob = "0.3"
191204
hex = "0.4.3"
192205
hexf-parse = "0.2.1"
206+
hmac = "0.12"
193207
indexmap = { version = "2.14.0", features = ["std"] }
194208
insta = "1.47"
195209
itertools = "0.14.0"
@@ -198,48 +212,81 @@ junction = "1.4.2"
198212
lexical-parse-float = "1.0.6"
199213
libc = "0.2.186"
200214
libffi = "5"
215+
liblzma = "0.4"
216+
liblzma-sys = "0.4"
217+
libsqlite3-sys = "0.37"
218+
libz-sys = { package = "libz-rs-sys", version = "0.5" }
201219
log = "0.4.29"
202220
nix = { version = "0.31", features = ["fs", "user", "process", "term", "time", "signal", "ioctl", "socket", "sched", "zerocopy", "dir", "hostname", "net", "poll"] }
221+
mac_address = "1.1.3"
203222
malachite-bigint = "0.9.1"
204223
malachite-q = "0.9.1"
205224
malachite-base = "0.9.1"
206225
maplit = "1.0.2"
226+
md-5 = "0.10.1"
207227
memchr = "2.8.0"
228+
memmap2 = "0.9.10"
229+
mt19937 = "<=3.2" # upgrade it once rand is upgraded
208230
num-complex = "0.4.6"
209231
num-integer = "0.1.46"
210232
num-traits = "0.2"
211233
num_enum = { version = "0.7", default-features = false }
234+
oid-registry = "0.8"
235+
openssl = "0.10.78"
236+
openssl-sys = "0.9.110"
237+
openssl-probe = "0.2.1"
212238
optional = "0.5"
239+
page_size = "0.6"
213240
parking_lot = "0.12.3"
214241
paste = "1.0.15"
242+
pbkdf2 = "0.12"
243+
pem-rfc7468 = "1.0"
244+
pkcs8 = "0.10"
215245
proc-macro2 = "1.0.105"
216246
pymath = { version = "0.2.0", features = ["mul_add", "malachite-bigint", "complex"] }
217247
quote = "1.0.45"
218248
radium = "1.1.1"
219249
rand = "0.9"
220250
rand_core = { version = "0.9", features = ["os_rng"] }
221251
rustix = { version = "1.1", features = ["event"] }
252+
rustls = { version = "0.23.39", default-features = false }
253+
rustls-native-certs = "0.8"
254+
rustls-pemfile = "2.2"
255+
rustls-platform-verifier = "0.7"
222256
rustyline = "18"
223257
serde = { package = "serde_core", version = "1.0.225", default-features = false, features = ["alloc"] }
224258
schannel = "0.1.29"
225259
scoped-tls = "1"
226260
scopeguard = "1"
261+
sha-1 = "0.10.0"
262+
sha2 = "0.10.2"
263+
sha3 = "0.10.1"
264+
socket2 = "0.6.3"
227265
static_assertions = "1.1"
228266
strum = "0.28"
229267
strum_macros = "0.28"
230268
syn = "2"
231269
syn-ext = "0.5.0"
270+
system-configuration = "0.7.0"
271+
tcl-sys = { git = "https://github.com/arihant2math/tkinter.git", tag = "v0.2.0" }
232272
textwrap = { version = "0.16.2", default-features = false }
233273
termios = "0.3.3"
234274
thiserror = "2.0"
275+
tk-sys = { git = "https://github.com/arihant2math/tkinter.git", tag = "v0.2.0" }
235276
icu_properties = "2"
236277
icu_normalizer = "2"
278+
uuid = "1.23.1"
279+
ucd = "0.1.1"
237280
unicode-casing = "0.1.1"
238281
unic-ucd-age = "0.9.0"
239282
unicode_names2 = "2.0.0"
240283
widestring = "1.2.0"
241284
windows-sys = "0.61.2"
242285
wasm-bindgen = "0.2.106"
286+
webpki-roots = "1.0"
287+
x509-cert = "0.2.5"
288+
x509-parser = "0.18"
289+
xml = "1.2"
243290

244291
# Lints
245292

crates/stdlib/Cargo.toml

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,28 @@ malachite-bigint = { workspace = true }
5151
num-traits = { workspace = true }
5252
num_enum = { workspace = true }
5353
parking_lot = { workspace = true }
54-
phf = { version = "0.13", features = ["macros"] }
54+
phf = { workspace = true, default-features = true, features = ["macros"] }
5555

5656
memchr = { workspace = true }
57-
base64 = "0.22"
58-
csv-core = "0.1.11"
59-
dyn-clone = "1.0.10"
57+
base64 = { workspace = true }
58+
csv-core = { workspace = true }
59+
dyn-clone = { workspace = true }
6060
pymath = { workspace = true }
61-
xml = "1.2"
61+
xml = { workspace = true }
6262

6363
# random
6464
rand_core = { workspace = true }
65-
mt19937 = "<=3.2" # upgrade it once rand is upgraded
65+
mt19937 = { workspace = true }
6666

6767
# Crypto:
68-
digest = "0.10.7"
69-
md-5 = "0.10.1"
70-
sha-1 = "0.10.0"
71-
sha2 = "0.10.2"
72-
sha3 = "0.10.1"
73-
blake2 = "0.10.4"
74-
hmac = "0.12"
75-
pbkdf2 = { version = "0.12", features = ["hmac"] }
68+
digest = { workspace = true }
69+
md-5 = { workspace = true }
70+
sha-1 = { workspace = true }
71+
sha2 = { workspace = true }
72+
sha3 = { workspace = true }
73+
blake2 = { workspace = true }
74+
hmac = { workspace = true }
75+
pbkdf2 = { workspace = true, features = ["hmac"] }
7676
constant_time_eq = { workspace = true }
7777

7878
## unicode stuff
@@ -81,64 +81,64 @@ unicode_names2 = { workspace = true }
8181
icu_properties = { workspace = true }
8282
icu_normalizer = { workspace = true }
8383
unic-ucd-age = { workspace = true }
84-
ucd = "0.1.1"
84+
ucd = { workspace = true }
8585

8686
# compression
87-
adler32 = "1.2.0"
88-
crc32fast = "1.3.2"
89-
flate2 = { version = "1.1.9", default-features = false, features = ["zlib-rs"] }
90-
libz-sys = { package = "libz-rs-sys", version = "0.5" }
91-
bzip2 = "0.6"
87+
adler32 = { workspace = true }
88+
crc32fast = { workspace = true }
89+
flate2 = { workspace = true, features = ["zlib-rs"] }
90+
libz-sys = { package = "libz-rs-sys", workspace = true }
91+
bzip2 = { workspace = true }
9292

9393
# tkinter
94-
tk-sys = { git = "https://github.com/arihant2math/tkinter.git", tag = "v0.2.0", optional = true }
95-
tcl-sys = { git = "https://github.com/arihant2math/tkinter.git", tag = "v0.2.0", optional = true }
94+
tk-sys = { workspace = true, optional = true }
95+
tcl-sys = { workspace = true, optional = true }
9696
widestring = { workspace = true, optional = true }
9797
chrono.workspace = true
9898

9999
# uuid
100100
[target.'cfg(not(any(target_os = "ios", target_os = "android", target_os = "windows", target_arch = "wasm32", target_os = "redox")))'.dependencies]
101-
mac_address = "1.1.3"
102-
uuid = { version = "1.23.1", features = ["v1"] }
101+
mac_address = { workspace = true }
102+
uuid = { workspace = true, features = ["v1"] }
103103

104104
[target.'cfg(all(unix, not(target_os = "redox"), not(target_os = "ios")))'.dependencies]
105-
termios = "0.3.3"
105+
termios = { workspace = true }
106106

107107
[target.'cfg(unix)'.dependencies]
108108
rustix = { workspace = true }
109109

110110
# mmap + socket dependencies
111111
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
112-
memmap2 = "0.9.10"
113-
page_size = "0.6"
114-
gethostname = "1.0.2"
115-
socket2 = { version = "0.6.3", features = ["all"] }
116-
dns-lookup = "3.0"
112+
memmap2 = { workspace = true }
113+
page_size = { workspace = true }
114+
gethostname = { workspace = true }
115+
socket2 = { workspace = true, features = ["all"] }
116+
dns-lookup = { workspace = true }
117117

118118
# OpenSSL dependencies (optional, for ssl-openssl feature)
119-
openssl = { version = "0.10.78", optional = true }
120-
openssl-sys = { version = "0.9.110", optional = true }
121-
openssl-probe = { version = "0.2.1", optional = true }
122-
foreign-types-shared = { version = "0.3.1", optional = true }
119+
openssl = { workspace = true, optional = true }
120+
openssl-sys = { workspace = true, optional = true }
121+
openssl-probe = { workspace = true, optional = true }
122+
foreign-types-shared = { workspace = true, optional = true }
123123

124124
# Rustls dependencies (optional, for ssl-rustls feature)
125-
rustls = { version = "0.23.39", default-features = false, features = ["std", "tls12", "aws_lc_rs"], optional = true }
126-
rustls-native-certs = { version = "0.8", optional = true }
127-
rustls-pemfile = { version = "2.2", optional = true }
128-
rustls-platform-verifier = { version = "0.7", optional = true }
129-
x509-cert = { version = "0.2.5", features = ["pem", "builder"], optional = true }
130-
x509-parser = { version = "0.18", optional = true }
125+
rustls = { workspace = true, default-features = false, features = ["std", "tls12", "aws_lc_rs"], optional = true }
126+
rustls-native-certs = { workspace = true, optional = true }
127+
rustls-pemfile = { workspace = true, optional = true }
128+
rustls-platform-verifier = { workspace = true, optional = true }
129+
x509-cert = { workspace = true, features = ["pem", "builder"], optional = true }
130+
x509-parser = { workspace = true, optional = true }
131131
der = { workspace = true, optional = true }
132-
pem-rfc7468 = { version = "1.0", features = ["alloc"], optional = true }
133-
webpki-roots = { version = "1.0", optional = true }
134-
aws-lc-rs = { version = "1.16.3", optional = true }
135-
oid-registry = { version = "0.8", features = ["x509", "pkcs1", "nist_algs"], optional = true }
136-
pkcs8 = { version = "0.10", features = ["encryption", "pkcs5", "pem"], optional = true }
132+
pem-rfc7468 = { workspace = true, features = ["alloc"], optional = true }
133+
webpki-roots = { workspace = true, optional = true }
134+
aws-lc-rs = { workspace = true, optional = true }
135+
oid-registry = { workspace = true, features = ["x509", "pkcs1", "nist_algs"], optional = true }
136+
pkcs8 = { workspace = true, features = ["encryption", "pkcs5", "pem"], optional = true }
137137

138138
[target.'cfg(not(any(target_os = "android", target_arch = "wasm32")))'.dependencies]
139-
libsqlite3-sys = { version = "0.37", features = ["bundled"], optional = true }
140-
liblzma = "0.4"
141-
liblzma-sys = "0.4"
139+
libsqlite3-sys = { workspace = true, features = ["bundled"], optional = true }
140+
liblzma = { workspace = true }
141+
liblzma-sys = { workspace = true }
142142

143143
[target.'cfg(windows)'.dependencies]
144144
paste = { workspace = true }
@@ -163,7 +163,7 @@ features = [
163163
]
164164

165165
[target.'cfg(target_os = "macos")'.dependencies]
166-
system-configuration = "0.7.0"
166+
system-configuration = { workspace = true }
167167

168168
[lints]
169169
workspace = true

0 commit comments

Comments
 (0)