Title: Sync selected Python 3.15 core library tests and repr type errors by youknowdot · Pull Request #9321 · RustPython/RustPython · GitHub
Open Graph Title: Sync selected Python 3.15 core library tests and repr type errors by youknowdot · Pull Request #9321 · RustPython/RustPython
X Title: Sync selected Python 3.15 core library tests and repr type errors by youknowdot · Pull Request #9321 · RustPython/RustPython
Description: Summary Synchronize ten selected library paths with CPython 3.15.0 at d220409a13b77de7a6c30abe16ea90db01528edc, using the canonical updater and preserving existing RustPython adapters and expected-failure markers. The synchronized ExceptionGroup regression exposed an actual main-RustPython failure: a non-string __repr__ result still produced __repr__ returned non-string (type NoneType) instead of the new qualified diagnostic. Update the generic Rust repr slot wrapper to emit {receiver_type}.__repr__() must return a str, not {result_type}, using the existing fully qualified type-name helper. Valid string results, including subclasses, and exceptions raised by __repr__ retain their existing paths. The initial published head f128630 exposed another canonical regression in all three OS CI jobs: test_mutating_decode_handler_unicode_escape returned consumed length 4 after an error handler replaced an original six-byte buffer. The follow-up Rust fix retains the original input length on successful Unicode/raw-Unicode escape decoding and uses the current cursor only at existing incomplete non-final exits. This matches CPython's wrapper initialization and incomplete handling without changing buffer mutation, restart validation, warnings or canonical tests. The 13-file patch contains: Lib/platform.py and its tests: canonical normalization, deprecation and Python 3.15 API-removal changes. Codec callback unregister coverage, ExceptionGroup repr coverage, builtin-function attributes, JSON escape/version cases, and frozendict set/UserDict coverage. The required generic repr diagnostic fix in crates/vm/src/types/slot.rs. Consumed-length accounting fixes in the two common Rust escape decoders. Upstream test assertions, cases and guards are preserved rather than rewritten to accommodate RustPython. The canonical deep-ExceptionGroup stack guards and removal of the deprecated Java platform test come from the pinned CPython source; no local skip, xfail or assertion weakening was introduced to make the selected tests pass. Validation Linux, pinned Rust toolchain 1.99.1, with the candidate built from main Rust code plus this patch, not the separate vectorcall candidate: cargo build --locked --offline --bin rustpython: passed. cargo clippy --locked --offline -p rustpython-common -p rustpython-vm --lib -- -D warnings: passed on the codec-fix source; earlier VM-only lint also passed on the repr source. Check-only rustfmt: earlier repr slot and both changed common escape-decoder files passed. Normal commit hooks, without bypass: the initial commit passed merge-conflict, ruff format, redundant-test-patches, rustfmt, cspell and ruff checks; Prettier had no applicable files. The Rust-only codec follow-up passed merge-conflict, rustfmt and cspell; Python/Prettier hooks had no applicable files. Neither commit hook run changed tested source. Bounded existing-TestCase selection: 55 passes and one canonical CPython-only skip, across ten fresh processes on the codec-fix source. Exact method selection preserved normal imports, fixtures and decorators; it did not use discovery or module-level load_tests. Platform: 1 pass, test__comparable_version canonically skipped. Codec callbacks: 4 passes, including the exact mutation method that failed CI, with all twelve canonical cases and three sliced-memoryview inputs. Unicode/raw-Unicode escape codecs: 11 passes, including ordinary, warning/error, incremental, StreamReader and partial-input regressions. ExceptionGroup repr: 6 passes, including test_repr_raises and its raised-exception propagation branch. UserDict: 2 passes. Sets/frozendict: 18 passes. JSON: 7 passes, with pure-Python and accelerated bad-escape/truncated-input cases and implementation identities checked separately. Builtin function attributes: 1 pass. Builtin repr/ascii: 3 passes. Descriptor/str-subclass repr: 2 passes. Before the Rust fix, the same synchronized Lib files produced 5 passes, one canonical skip and the real test_repr_raises assertion failure; the original remaining 28 selectors were not run after that failure. Those results were retained. After rebuilding with the repr fix, all original 35 selectors and nine additional existing repr regressions ran under a new source/binary binding (43 passes and one canonical skip). The subsequent published f128630 CI failure in the Unicode mutation method was retained, not hidden by this bounded result. After the codec fix, all those 44 selectors plus twelve existing codec selectors ran under a separate fresh binding (55 passes and one canonical skip). The earlier initial build was interrupted without a terminal receipt; the successful retry and later fixed-source build reused verified owned compilation cache, not an unrelated binary. Runtime source/tool/binary bindings, module-origin checks, per-ID accounting and resource checks passed in every completed fixed-source gate. The follow-up commit 03e7da1 has all 3,715 tracked file/link contents and modes independently verified against the final tested source manifest. Validation receipts retain their original pre-commit HEAD/status bindings; this is committed-source equivalence, not a claimed post-commit rerun. Not run: complete affected-module suites, full workspace tests, separate crates/capi tests, release-profile validation, all-feature/build matrices, local Windows/macOS/WASM or other non-Linux checks. Earlier CI on f128630 failed the codec mutation case on Linux, macOS and Windows; a fresh CI result for the follow-up commit is not yet verified and is not implied by these Linux checks. These bounded results do not establish full Python 3.15 compatibility or whole-repository validation. Relationship to other work Fresh main was still e5554e23abfbaee85508c32fc22e5074f88aebdd when checked on October 23. Among these ten Lib paths, only Lib/test/test_platform.py overlaps #8954. This is not ten extractions from that PR. The generic repr fix is new; #8954, #9320 and other open slot-related work touch different slot.rs areas. #6215 touches separate test_set.py hunks. This is a source-overlap review, not a merge-conflict simulation; related work may need reconciliation when landing. AI assistance OpenAI Codex assisted source synchronization/review, the Rust diagnostic and codec-accounting fixes, validation, and this PR description. The model version identifier is unavailable. These are automated checks, not a claim of human testing. The commit includes Assisted-by: OpenAI Codex:model version unavailable.
Open Graph Description: Summary Synchronize ten selected library paths with CPython 3.15.0 at d220409a13b77de7a6c30abe16ea90db01528edc, using the canonical updater and preserving existing RustPython adapters and expected-...
X Description: Summary Synchronize ten selected library paths with CPython 3.15.0 at d220409a13b77de7a6c30abe16ea90db01528edc, using the canonical updater and preserving existing RustPython adapters and expected-...
Opengraph URL: https://github.com/RustPython/RustPython/pull/9321
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:88bcf34b-fdfa-e17d-2830-d39661f92c98 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 88F2:211F05:71DF9:8E893:6B01FB83 |
| html-safe-nonce | 331e917edb25a5d1ef06a71b9e97cd300c6499a0864b1b85fa0653b969f7232d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OEYyOjIxMUYwNTo3MURGOTo4RTg5Mzo2QjAxRkI4MyIsInZpc2l0b3JfaWQiOiI0ODY0NTg3OTY2Nzg3NDg0NTQ3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4d4a0a905e7b4d2f8916d29184ac0d24385d2399ae395e7fa0ae8e684e057698 |
| hovercard-subject-tag | pull_request:4976414943 |
| 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/9321/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 Synchronize ten selected library paths with CPython 3.15.0 at d220409a13b77de7a6c30abe16ea90db01528edc, using the canonical updater and preserving existing RustPython adapters and expected-... |
| 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