Repository navigation
Align collections and testing libraries with Python 3.15 - #9192
youknowdot wants to merge 2 commits into
Conversation
Refresh twelve production modules and canonical tests through scripts/update_lib at CPython d220409a13b77de7a6c30abe16ea90db01528edc. Preserve existing RustPython unittest helpers and test guards. Accept frozendict in native defaultdict and OrderedDict union slots, matching upstream PyAnyDict_Check without changing constructors, factories, or update order. Validated as a local stack on the exact RustPython#9189 regex/dataclasses/typing prerequisite; this dependency avoids eager typing.ByteString deprecation during unittest warning tests. Assisted-by: OpenAI Codex: model version unavailable
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: :4: SyntaxWarning: invalid decimal literal dependencies:
dependent tests: (82 tests)
[ ] lib: cpython/Lib/unittest dependencies:
dependent tests: (402 tests)
[x] lib: cpython/Lib/collections dependencies:
dependent tests: (344 tests)
[x] lib: cpython/Lib/doctest.py dependencies:
dependent tests: (36 tests)
[x] lib: cpython/Lib/difflib.py dependencies:
dependent tests: (247 tests)
[ ] lib: cpython/Lib/test/libregrtest dependencies:
dependent tests: (no tests depend on regrtest) Legend:
|
Refresh the canonical test_regrtest consumer and its direct runner/pythoninfo closure through scripts/update_lib at CPython d220409a13b77de7a6c30abe16ea90db01528edc. Preserve both existing expected-failure markers. This aligns the runner test with doctest reporting two failed examples and one skipped example. Assisted-by: OpenAI Codex: model version unavailable
Summary
Split the connected collections/testing-library update out of #8954, following the landed #9189 dependency.
_collections_abc,collections,contextlib,difflib,doctest, and seven connectedunittestfiles from CPython 3.15.0d220409a13b77de7a6c30abe16ea90db01528edc.unittest.__init__helpers and existing test markers; unchanged unittest siblings already match the pin.frozendictin defaultdict/OrderedDict union operand checks through the existingPyAnyDictabstraction, matching CPython'sdefdict_or/odict_or. Factory retention, constructors, subclass construction and update order are unchanged.The initial split was 28 files: 12 production Python files (11 substantive modules plus the runner lazy-import companion), 13 Python test files, one fixture and two Rust files. Python updates use
scripts/update_lib; its_copy_singlefunction selects exact production files because the CLI expands Python submodule paths to entire packages. Tests use the updater's migration path. No manual Lib edits, new skips, duplicate snippets or CI workflows. The removed doctest checker injection was inactive: the old file contained no EXPECTED_FAILURE options, and its checker otherwise delegated unchanged.The dependency order is
_collections_abc→collections→contextlib/difflib→unittest.util→case/_log→suite→loader→main→doctest, with the runner companion included. #9189 supplies the matching lazy ByteString handling in typing; without it, the old eager alias emits an extra warning in unittest's subprocess test.Hosted CI follow-up
Ubuntu CI at the original
e3d65138head (merge ref29c35936) passed 431 test files, then exposed an old harness expectation intest_regrtest.ArgsTestCase.test_doctest: the canonical doctest reports two failures and one skip instead of the old one failure and no skips. Update the canonicaltest_regrtest,libregrtest.cmdline,libregrtest.main,libregrtest.utilsandpythoninfotogether through the updater. These five files provide the matching doctest expectation, runner--pythoninfointegration and build-information heading. Both existing RustPython expected-failure markers remain. The total is now 33 files; no native code changed in this follow-up.Validation
Candidate
e3d65138is based on maine7e3dfd6. Its 28-file patch is byte-identical to the previously validated39d9e5a8; all 47 files changed by intervening main merges are disjoint and retained. Earlier results remain attributed to the earlier base. Historical checks on that exact head (native/Cargo files are unchanged in follow-upe4b3feed):-D warnings.Source/dependency/toolchain and protected-worktree audits passed. unittest/doctest
-Esubprocesses generated 85/135 bytecode-cache files; the raw full-tree audits correctly reported those additions. Only hash-verified new caches were quarantined, then separate clean audits passed. Workspace/CAPI tests similarly generated 52/7 caches, with preserved raw statuses and separate clean post-quarantine audits. Raw logs and statuses are retained.The follow-up uses a new release build bound to its own worktree. Parent,
-Echild and-Ichild module paths all resolve the updated harness. The exact hosted failing doctest case passes both the pinned CPython oracle and the new RustPython candidate. The selected canonical test_regrtest passes 121 tests (9 existing skips, 2 expected failures), and all 17 related suites pass again, reporting 3,357 tests. Fresh source/dependency/protected-proof audits pass; generated bytecode caches from isolated children were hash-verified and quarantined with raw audit results retained. Native workspace/CAPI/Clippy results above belong toe3d65138and are reused only because all native and Cargo paths are unchanged.Hosted CI on
e4b3feedhas now completed successfully: 17 checks passed and 3 conditional checks were skipped. Ubuntu, macOS and Windows Python jobs and Rust jobs passed, along with Clippy, Miri, WASM, docs, lint and dependency checks. CI run. The Ubuntu log confirms merge377fe6fof this head intoe7e3dfd6;test_regrtestpassed, and the full Python run reported 45,759 tests (existing skips retained).Local coverage boundaries
Local unittest coverage externally excludes
test.test_unittest.test_async_case.*andtest.test_unittest.testmock.testasync.*; re excludes*ReTests.test_regression_gh94675, under the existing local socket boundary. These are selected-suite passes, not unfiltered passes. No test-source skip was added. Standard hosted CI complements these omissions.test_contextlib_asyncdirectly steps coroutines without creating an event loop. Default test resources remain in effect.The local
test_regrtestrun additionally excludes exactlyArgsTestCase.test_rerun_async_setup_hook_failure,ArgsTestCase.test_rerun_async_teardown_hook_failureandArgsTestCase.test_pythoninfo. The first two require AF_UNIX event loops; the last performs real socket capability/bind probes and system diagnostics.ParseArgsTestCase.test_pythoninforemains included. These are external selection limits only; the pythoninfo execution integration remains a local coverage gap for hosted CI to check. Even hosted success checks the runner/heading integration, not success of every best-effort diagnostic probe.AI assistance
This is maintainer-requested Python 3.15 maintenance work. OpenAI Codex assisted with dependency analysis, canonical updater execution, the two native operand checks, automated test execution and this description. The model version is unavailable. Commits include the Assisted-by trailer. The validation above describes automated checks, not a claim of additional manual human testing.