Skip to content

Retire obsolete standard-library test adapters - #9825

Merged
youknowone merged 1 commit into
RustPython:mainfrom
youknowdot:upgrade/lib-remaining-20261113
Nov 13, 2026
Merged

youknowone merged 1 commit into
RustPython:mainfrom
youknowdot:upgrade/lib-remaining-20261113

Conversation

@youknowdot

Copy link
Copy Markdown
Contributor

Summary

Use scripts/update_lib migrate against CPython v3.15.0 to retire obsolete adapters in five test modules:

  • restore the default doctest checker in test_genexps and test_descrtut (neither retains EXPECTED_FAILURE options);
  • restore fresh _json imports for the accelerated JSON suite;
  • remove the unavailable-module fallbacks for _datetime and cProfile, now registered by RustPython.

Existing failure markers remain, including the two conditional cProfile guards. The JSON recursion stack guards are deliberately unchanged: RustPython's C-recursion helper is not yet equivalent to CPython's C-stack estimate. No C API work or test assertions changed.

Verification

  • All five modules passed together in random order: 395 tests, 6 skips.
  • Commit hooks passed.
  • Independent source review covered native-module registration, JSON scanner identity, and doctest flags.
  • Focused execution used the existing RustPython dba7a05-based build with Ruff 0.17.5 and this checkout's Lib via RUSTPYTHONPATH. A new exact-head build and full workspace/CAPI aggregate checks were not run locally because the shared disk is nearly full. Hosted CI is pending; this is a draft.

AI-assisted implementation, investigation, and testing with OpenAI Codex (model version not exposed).

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters: 5

  • Lib/test/test_descrtut.py is excluded by !Lib/**
  • Lib/test/test_genexps.py is excluded by !Lib/**
  • Lib/test/test_json/__init__.py is excluded by !Lib/**
  • Lib/test/test_pstats.py is excluded by !Lib/**
  • Lib/test/test_types.py is excluded by !Lib/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

📦 Library Dependencies

The following Lib/ modules were modified. Here are their dependencies:

[x] lib: cpython/Lib/types.py
[ ] test: cpython/Lib/test/test_types.py (TODO: 2)

dependencies:

  • types

dependent tests: (61 tests)

  • types: test_annotationlib test_ast test_asyncgen test_asyncio test_builtin test_call test_capi test_code test_collections test_compile test_compiler_assemble test_coroutines test_crossinterp test_descr test_dis test_doctest test_dtrace test_dynamicclassattribute test_email test_enum test_exception_group test_fstring test_funcattrs test_generators test_genericalias test_global test_importlib test_inspect test_interpreters test_listcomps test_marshal test_monitoring test_opcache test_optimizer test_os test_pdb test_positional_only_arg test_pprint test_profiling test_pyclbr test_pydoc test_pyrepl test_raise test_rlcompleter test_site test_string test_subclassinit test_subprocess test_tempfile test_threading test_trace test_traceback test_type_aliases test_type_annotations test_type_params test_types test_typing test_unittest test_userdict test_xml_etree test_xml_etree_c

[x] test: cpython/Lib/test/test_generators.py
[x] test: cpython/Lib/test/test_genexps.py
[x] test: cpython/Lib/test/test_generator_stop.py
[x] test: cpython/Lib/test/test_yield_from.py

dependencies:

dependent tests: (no tests depend on generator)

[x] test: cpython/Lib/test/test_descr.py (TODO: 2)
[x] test: cpython/Lib/test/test_descrtut.py

dependencies:

dependent tests: (no tests depend on descr)

[x] lib: cpython/Lib/pstats.py
[x] test: cpython/Lib/test/test_pstats.py (TODO: 2)

dependencies:

  • pstats

dependent tests: (5 tests)

  • pstats: test_free_threading test_profile test_pstats
    • profiling.sampling.pstats_collector: test_profiling
    • profiling.tracing: test_profiling

[x] lib: cpython/Lib/json
[ ] test: cpython/Lib/test/test_json (TODO: 1)

dependencies:

  • json

dependent tests: (21 tests)

  • json: test_embed test_interpreters test_json test_logging test_plistlib test_profiling test_pydoc test_pyrepl test_remote_pdb test_subprocess test_sysconfig test_tomllib test_tools test_traceback test_zoneinfo
    • importlib.metadata: test_importlib
    • multiprocessing.resource_tracker: test_concurrent_futures
    • pdb: test_pdb
    • profiling: test_profiling
      • cProfile: test_free_threading test_pstats

Legend:

  • [+] path exists in CPython
  • [x] up-to-date, [ ] outdated

@codspeed

codspeed Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 62 untouched benchmarks
⏩ 4 skipped benchmarks1


Comparing youknowdot:upgrade/lib-remaining-20261113 (88f48dd) with main (e68658a)

Open in CodSpeed

Footnotes

  1. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

Regenerate five test modules from CPython 3.15.0 with update_lib migrate, preserving existing markers. Restore normal doctest checking and native module imports now supported by RustPython. Keep the JSON recursion guards and remaining conditional markers unchanged.

Assisted-by: Codex:version-unavailable
@youknowdot
youknowdot force-pushed the upgrade/lib-remaining-20261113 branch from 88f48dd to 6d6e3f7 Compare November 13, 2026 06:59
@youknowone
youknowone marked this pull request as ready for review November 13, 2026 08:00
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-13T08:00:58.866500Z
We couldn’t complete this review. Comment @codex review to try again.
6d6e3f7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@youknowone
youknowone merged commit e2e0823 into RustPython:main Nov 13, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants