Repository navigation
Commit c0694d9
authored
Reject stale GenericAlias parameters on Python 3.15 (#9069)
* Reject GenericAlias parameters added after caching
Validate stale cached parameters and retain the Python regression without obsolete reference prerequisites.
Assisted-by: OpenAI Codex:model identifier unavailable
* Compute GenericAlias parameters lazily for Python 3.15
Populate the parameter cache on first lookup or subscription. Preserve cached identity and outer lookup replacement, propagate descriptor failures, and release displaced parameters outside the cache lock. Add Python regressions for timing, retries, reentrancy, recursion and concurrent callbacks.
Assisted-by: OpenAI Codex:model identifier unavailable
* Check GenericAlias recursion at lazy parameter materialization
Align the existing cyclic and deeply nested fixtures with certified CPython 3.15. Keep RecursionError assertions, cover both parameter lookup and subscription on both interpreters, and retain the separate deep-hash regression.
Assisted-by: OpenAI Codex:model identifier unavailable
* Keep finite GenericAlias stack stress native-specific
Preserve shared cyclic recursion checks and all RustPython stress assertions. Finite acyclic depth is not a portable CPython C-stack limit across optimized builds.
Assisted-by: OpenAI Codex:model identifier unavailable
* Materialize union parameters lazily like GenericAlias
Share the reentrant-safe parameter cache between aliases and unions. Preserve parameter identity without applying union argument equality or flattening. Cover nested alias timing, descriptor retry, reentrant replacement, empty caches and concurrent callbacks in Python regressions checked against final CPython 3.15.
Assisted-by: OpenAI Codex:model identifier unavailable
* Consolidate union regressions in the typing snippet
Preserve all existing regression bodies and coverage while following the requested snippet organization.
Assisted-by: OpenAI Codex:model identifier unavailable1 parent e8cb0c7 commit c0694d9
5 files changed
Lines changed: 521 additions & 51 deletions
File tree
- crates/vm/src/builtins
- extra_tests/snippets
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | | - | |
111 | 110 | | |
112 | 111 | | |
113 | 112 | | |
114 | | - | |
| 113 | + | |
115 | 114 | | |
116 | 115 | | |
117 | 116 | | |
| |||
130 | 129 | | |
131 | 130 | | |
132 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
133 | 136 | | |
134 | 137 | | |
135 | 138 | | |
| |||
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
209 | | - | |
| 212 | + | |
| 213 | + | |
210 | 214 | | |
211 | 215 | | |
212 | 216 | | |
| |||
236 | 240 | | |
237 | 241 | | |
238 | 242 | | |
239 | | - | |
240 | | - | |
| 243 | + | |
| 244 | + | |
241 | 245 | | |
242 | 246 | | |
243 | 247 | | |
| |||
312 | 316 | | |
313 | 317 | | |
314 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
315 | 338 | | |
316 | 339 | | |
317 | 340 | | |
318 | 341 | | |
319 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
320 | 349 | | |
321 | 350 | | |
322 | 351 | | |
| |||
326 | 355 | | |
327 | 356 | | |
328 | 357 | | |
329 | | - | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
330 | 362 | | |
331 | 363 | | |
332 | 364 | | |
333 | | - | |
334 | | - | |
| 365 | + | |
| 366 | + | |
335 | 367 | | |
336 | | - | |
337 | | - | |
338 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
339 | 373 | | |
340 | 374 | | |
341 | 375 | | |
| |||
346 | 380 | | |
347 | 381 | | |
348 | 382 | | |
349 | | - | |
350 | | - | |
351 | | - | |
| 383 | + | |
352 | 384 | | |
353 | 385 | | |
354 | 386 | | |
| |||
558 | 590 | | |
559 | 591 | | |
560 | 592 | | |
561 | | - | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
562 | 597 | | |
563 | 598 | | |
564 | 599 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
| 45 | + | |
| 46 | + | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
51 | | - | |
52 | | - | |
| 50 | + | |
| 51 | + | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
127 | 126 | | |
128 | 127 | | |
129 | 128 | | |
130 | | - | |
131 | | - | |
| 129 | + | |
| 130 | + | |
132 | 131 | | |
133 | 132 | | |
134 | 133 | | |
| |||
239 | 238 | | |
240 | 239 | | |
241 | 240 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | 241 | | |
249 | 242 | | |
250 | 243 | | |
| |||
372 | 365 | | |
373 | 366 | | |
374 | 367 | | |
375 | | - | |
| 368 | + | |
376 | 369 | | |
377 | 370 | | |
378 | 371 | | |
379 | 372 | | |
380 | 373 | | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
388 | 377 | | |
389 | 378 | | |
390 | 379 | | |
| |||
0 commit comments