Title: Update Lib stream concurrency tests and pyrepl decorators to Python 3.15 by youknowdot · Pull Request #9434 · RustPython/RustPython · GitHub
Open Graph Title: Update Lib stream concurrency tests and pyrepl decorators to Python 3.15 by youknowdot · Pull Request #9434 · RustPython/RustPython
X Title: Update Lib stream concurrency tests and pyrepl decorators to Python 3.15 by youknowdot · Pull Request #9434 · RustPython/RustPython
Description: Summary Sync three previously missing canonical Python 3.15 free-threading suites: bz2, lzma, and pickle (six test methods). Restore canonical class-decorator lambdas in pyrepl's Unix console tests, removing obsolete RustPython symbol-table workarounds. Preserve the existing Android expected-failure marker. All four migrations use scripts/update_lib migrate from CPython d220409a13b77de7a6c30abe16ea90db01528edc. The three new files are byte-identical; no new skips, assertion changes, or duplicated package initializer. Scope and validation Updater unit tests: 228 passed. Applicable configured hooks and diff checks passed. The three free-threading suites were source-reviewed, not run locally. RustPython passes the package GIL-disabled gate; ordinary threading/provider gates still apply, and hosted CI must establish their runtime result. Stream methods serialize native state; pickle copies owned references under container guards before recursive encoding. This does not establish general CPython concurrency or compression equivalence. Compression tests use up to 10 workers. Pickle uses 11 workers per test and 20,000 total dumps of containers up to roughly 1,000 integers. Existing CI's 600-second test timeout is outer containment, not proof of deadlock freedom. Importing test_bz2.BaseTest reads/compresses a finite list of test source files (432 files / 16.5 MB source upper bound at the base). Its decoder helper may invoke bunzip2, otherwise using bz2.decompress; no internal subprocess timeout is added. Five isolated canonical compile/decorator checks passed on a provenance-verified earlier RustPython binary with unchanged compiler/symbol-table sources. These did not import or execute the full pyrepl test module or exercise a terminal/PTY, and are not a full current-main suite result. The remaining free-threading zlib suite is intentionally not included: #8909 addresses a relevant pending-output drain path. The intern and JSON prerequisites in #9430 and #9431 are now merged. Native LZMA prerequisite found by CI The original head failed the canonical LZMA decompressor test on Linux, macOS and Windows. The same zero-length first result reproduces with ten serial calls, so this failure is not evidence of a locking race. LZMA_GET_CHECK consumes the header without output; the old current-liblzma loop then mistook allocated output capacity for produced bytes and returned prematurely. The focused native follow-up changes only crates/common/src/compression/lzma.rs: use a bounded output slice and actual consumed/produced counts, continue after header notification, drain pending output with empty input, and maintain needs_input from output-quota exhaustion. No backend or locking replacement, and all four posted Lib files remain unchanged. Validation of the follow-up: Scoped cargo check, strict Clippy, configured hooks and a bounded executable build passed. Eight complete existing canonical LZMA methods passed without skips: chunked/empty-input/max-size decoding, input-buffer cases 1–3, unused data and calls after EOF. The exact ten-call serial equivalent now returns ten 128-byte chunks, the full expected payload, EOF true, needs_input false and 828 bytes of unused data. Small zero-quota and empty-input sequences were also checked. These are serial checks, not local execution of the free-threading suites. The pinned CPython 3.15 host lacks _lzma; compatibility evidence is its canonical tests and C implementation, not a successful CPython runtime differential run. Broader native-error recovery state behavior remains outside this fix. This current-liblzma correction intentionally overlaps the progress/capped-output algorithm in pending #8639, whose xz-core port would supersede this loop. The full backend port is not imported here; this is a focused prerequisite for the already-posted canonical tests. Assisted by OpenAI Codex; model version unavailable. Summary by CodeRabbit Bug Fixes Improved LZMA decompression when output is limited, buffered data remains, or input is exhausted, reducing the chance of incorrect stream status or buffer-space errors. Follow-up: retire obsolete LZMA markers The native buffered-output fix also makes the complete canonical CompressorDecompressorTestCase.test_decompressor_chunks_maxsize and FileTestCase.test_issue21872 pass. Their old expected-failure decorators caused unexpected-success failures in the next hosted run; scripts/update_lib migrate now retires exactly those two decorators, preserving all other markers and canonical assertions. Both full methods passed against pinned canonical source (2 tests) and regenerated repository source (2 tests), without skips or expected failures, using the unchanged protected native binary. These are bounded in-memory decompression tests; no broader LZMA or local concurrency suite was run for this follow-up.
Open Graph Description: Summary Sync three previously missing canonical Python 3.15 free-threading suites: bz2, lzma, and pickle (six test methods). Restore canonical class-decorator lambdas in pyrepl's Unix console ...
X Description: Summary Sync three previously missing canonical Python 3.15 free-threading suites: bz2, lzma, and pickle (six test methods). Restore canonical class-decorator lambdas in pyrepl's Unix cons...
Opengraph URL: https://github.com/RustPython/RustPython/pull/9434
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:7f3e2731-488c-5752-8706-c3ea57b61dfa |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DB5E:E9D16:30A9E6B:3DC3BB6:6B01FE56 |
| html-safe-nonce | 484f39581abcf6daad6365003fc8b9aa0fca79d7f1f163a85db84922b17aea29 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjVFOkU5RDE2OjMwQTlFNkI6M0RDM0JCNjo2QjAxRkU1NiIsInZpc2l0b3JfaWQiOiI0Mzg4MzEzMDM0Njc0Nzk4MTY2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 81bafec71dd34fb9e0ef8a1199e63ca35b4e904c9220b1eb4dca61c1d875e94e |
| hovercard-subject-tag | pull_request:5051673549 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/9434/files |
| twitter:image | https://avatars.githubusercontent.com/u/336763669?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/336763669?s=400&v=4 |
| og:image:alt | Summary Sync three previously missing canonical Python 3.15 free-threading suites: bz2, lzma, and pickle (six test methods). Restore canonical class-decorator lambdas in pyrepl's Unix console ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width