Commit bd2d6f6
authored
Update/regenerate various
## Summary
1. Manually update various functions in
`crates/ruff_python_stdlib/src/builtins.rs` to reflect new APIs added in
Python 3.15.
2. Manually remove the incorrect inclusion of `frozenset` from
`is_immutable_non_generic_type` in
`crates/ruff_python_stdlib/src/typing.rs`. `frozenset` is a generic
type.
3. Manually add `frozendict` to `is_immutable_generic_type` and
`is_immutable_return_type` in `crates/ruff_python_stdlib/src/typing.rs`
4. Manually updates to `scripts/generate_builtin_modules.py`: use uv to
invoke Python rather than relying on many different Python versions all
being on `PATH`, drop support for Python 3.7 from the script (it can't
be installed using uv), and apply various other simplifications.
5. Regenerate `is_builtin_module` in
`crates/ruff_python_stdlib/src/sys/builtin_modules.rs` following the
changes made in (4). Note that switching to uv-managed Python installs
(PBS) appears to mean that quite a few more stdlib modules are
recognised as being builtin modules, which is interesting.
I also ran `scripts/generate_known_standard_library.py`, but it didn't
make any changes to the Rust function generated by that script.
## Test Plan
`cargo test`ruff_python_stdlib APIs (#25273)1 parent 4bae734 commit bd2d6f6
6 files changed
Lines changed: 199 additions & 64 deletions
File tree
- .github/workflows
- crates/ruff_python_stdlib/src
- sys
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
190 | 195 | | |
191 | 196 | | |
192 | 197 | | |
| |||
410 | 415 | | |
411 | 416 | | |
412 | 417 | | |
413 | | - | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
414 | 422 | | |
415 | 423 | | |
416 | 424 | | |
| |||
522 | 530 | | |
523 | 531 | | |
524 | 532 | | |
525 | | - | |
| 533 | + | |
526 | 534 | | |
527 | 535 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
21 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
22 | 40 | | |
| 41 | + | |
| 42 | + | |
23 | 43 | | |
24 | 44 | | |
| 45 | + | |
25 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
26 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
27 | 62 | | |
| 63 | + | |
| 64 | + | |
28 | 65 | | |
| 66 | + | |
29 | 67 | | |
| 68 | + | |
30 | 69 | | |
| 70 | + | |
31 | 71 | | |
| 72 | + | |
32 | 73 | | |
33 | 74 | | |
| 75 | + | |
34 | 76 | | |
35 | 77 | | |
| 78 | + | |
36 | 79 | | |
| 80 | + | |
37 | 81 | | |
| 82 | + | |
38 | 83 | | |
39 | 84 | | |
| 85 | + | |
40 | 86 | | |
| 87 | + | |
41 | 88 | | |
42 | 89 | | |
| 90 | + | |
| 91 | + | |
43 | 92 | | |
44 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
45 | 98 | | |
| 99 | + | |
| 100 | + | |
46 | 101 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
54 | 190 | | |
55 | 191 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
| 249 | + | |
258 | 250 | | |
259 | 251 | | |
260 | 252 | | |
| |||
264 | 256 | | |
265 | 257 | | |
266 | 258 | | |
267 | | - | |
| 259 | + | |
268 | 260 | | |
269 | 261 | | |
270 | 262 | | |
| |||
335 | 327 | | |
336 | 328 | | |
337 | 329 | | |
| 330 | + | |
338 | 331 | | |
339 | 332 | | |
340 | 333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
| 427 | + | |
431 | 428 | | |
432 | 429 | | |
433 | 430 | | |
| |||
0 commit comments