GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Restore ten guarded C API test modules by youknowdot · Pull Request #9505 · RustPython/RustPython

Conversation

@youknowdot

@youknowdot youknowdot commented Oct 31, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Summary

Restore ten whole test_capi modules from pinned CPython 3.15 (d220409a13b77de7a6c30abe16ea90db01528edc) through the actual scripts/update_lib migrate command:

  • Canonical byte-identical: test_file, test_object, test_run, test_set, test_slots, test_tuple, test_complex, test_float.
  • test_codecs: use the existing optional import helper for _testcapi before the unchanged _testlimitedcapi gate.
  • test_getargs: bind the genuinely required getargs_keywords and getargs_keyword_only through existing support.get_attribute. A partial fixture such as Add a _testcapi module #9143 lacks these APIs; this raises a real capability skip rather than an import failure. The unchanged complex/float sibling imports propagate that skip.

All class/function bodies, decorators and assertions remain canonical. No new skip decorators, xfails, fake fixtures or global test-disable switches are introduced. This is source restoration, not implementation of these C API fixtures. The package still has 22 missing canonical files afterward.

Tooling consolidation

The import-binding rewrite extension has been removed. This PR now contains only the ten whole test files, unchanged from their prior reviewed bytes. The existing migrate --patches preservation blocks reproduce both adapted files exactly without another import-rewrite framework. Updater implementation changes are consolidated in #9578.

The existing hold remains: do not add these tests before #9270 lands.

Current consolidation validation

  • All ten Lib/ files are byte-identical to the prior PR head.
  • The remaining host updater suite passes: 233 tests. Normal configured commit hooks pass.
  • A temporary-directory check reproduced both adapted whole modules byte-for-byte using the existing preservation-block path and verified their class/function ASTs against pinned CPython.
  • No C API tests were executed. Prior validation below is historical, not a new runtime result.

Original validation (before tooling removal)

  • Reproduced on main 88f373357f40923c7b1bb533072e7962790e2663; all 17 original parent-file bytes were checked against their PR heads.
  • Host updater suite: 241 tests passed, independently rechecked with Python 3.13 and 3.12.
  • Actual candidate updater generated all ten modules. Eight canonical byte identities, two exact reviewed metadata adaptations, and full class/function/decorator/assertion AST equality were verified.
  • Normal configured commit hooks passed; final 13-file hashes and reviewed diff were unchanged afterward.
  • Following an execution-environment reset, the private reviewed patch and metadata were recovered byte-for-byte from preserved artifacts. The newly generated files exactly match the historical Python 3.15 migration output hashes. Current selected-source parsing/tooling checks used Python 3.13; no fresh Python 3.15 runtime or full dependency-graph validation is claimed.

Limits and future activation

No C API test module was imported or executed locally, and no Rust/native build or full interpreter suite was run for this source-only cohort. Missing-fixture skips in ordinary builds are not C API behavioral passes or complete CPython compatibility.

If a future _testcapi provides both getargs entry points, re-review the subsequent constants, eager class-body getargs_positional_only_and_keywords import and remaining parser APIs before activation. Introducing _testlimitedcapi similarly requires separate review of NULL/invalid arguments, refcounts, mutation, GC/finalizer and subprocess paths. Existing bodies are preserved, not claimed safe or supported by module presence alone.

AI assistance

OpenAI Codex assisted source investigation, updater implementation, migration, recovery and validation, with independent agent review. The runtime model version is unavailable. This reports tool/source evidence, not human manual validation or unexecuted native compatibility checks.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@youknowdot
Restore guarded C API argument and object test sources
2b751f7
Restore ten CPython 3.15 test modules through the actual update_lib migrator. Eight are canonical copies; codecs/getargs use declared exact optional-module and required-attribute bindings while all class/function/decorator/assertion ASTs remain unchanged. Extend the landed generic updater with an explicit import-binding rewrite option, preserving default validation and hash/path/block/protected-AST guards.

Reproduced on main 88f3733 after both prerequisite PRs landed. The recovered reviewed tooling delta is applied before migration; no synthetic dependency commit is included. Current host tooling suite passes 241 tests with Python 3.13, selected AST/source proof and normal hooks pass, and all output bytes match preserved historical Python 3.15 migration hashes. This is not a fresh Python 3.15 runtime or dependency-graph validation. No C API test modules or native fixtures were executed; unsupported fixture skips are not complete C API compatibility.

Assisted-by: OpenAI Codex:model version unavailable
@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Nov 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

📦 Library Dependencies

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

[x] lib: cpython/Lib/codecs.py
[x] test: cpython/Lib/test/test_charmapcodec.py
[x] test: cpython/Lib/test/test_codeccallbacks.py (TODO: 3)
[x] test: cpython/Lib/test/test_codecencodings_cn.py
[x] test: cpython/Lib/test/test_codecencodings_hk.py
[x] test: cpython/Lib/test/test_codecencodings_iso2022.py
[x] test: cpython/Lib/test/test_codecencodings_jp.py
[x] test: cpython/Lib/test/test_codecencodings_kr.py
[x] test: cpython/Lib/test/test_codecencodings_tw.py
[x] test: cpython/Lib/test/test_codecmaps_cn.py
[x] test: cpython/Lib/test/test_codecmaps_hk.py
[x] test: cpython/Lib/test/test_codecmaps_jp.py
[x] test: cpython/Lib/test/test_codecmaps_kr.py
[x] test: cpython/Lib/test/test_codecmaps_tw.py
[x] test: cpython/Lib/test/test_codecs.py (TODO: 2)
[x] test: cpython/Lib/test/test_multibytecodec.py
[x] test: cpython/Lib/test/testcodec.py

dependencies:

  • codecs

dependent tests: (202 tests)

  • codecs: test_capi test_charmapcodec test_codeccallbacks test_codecs test_curses test_eof test_exceptions test_free_threading test_importlib test_inspect test_io test_json test_locale test_logging test_multibytecodec test_os test_pdb test_plistlib test_readline test_sax test_str test_sys
    • email.charset: test_email
    • email.utils: test_httpservers test_smtplib test_urllib2
      • http.server: test_robotparser test_urllib2_localnet test_xmlrpc
      • logging.handlers: test_concurrent_futures test_pkgutil
      • smtplib: test_smtpnet
      • urllib.request: test_http_cookiejar test_pathlib test_pydoc test_site test_ssl test_urllib test_urllib2net test_urllibnet
    • encodings: test_email
      • locale: test__locale test_builtin test_c_locale_coercion test_calendar test_cmd_line test_decimal test_float test_format test_re test_regrtest test_strftime test_strptime test_tkinter test_types test_utf8_mode
    • json: test_embed test_interpreters test_json test_profiling test_pyrepl test_remote_pdb test_subprocess test_sysconfig test_tomllib test_tools test_traceback test_zoneinfo
      • importlib.metadata: test_importlib
      • profiling: test_profiling
    • pickle: test_annotationlib test_argparse test_array test_ast test_asyncio test_bool test_bytes test_bz2 test_capi test_collections test_concurrent_futures test_configparser test_coroutines test_csv test_ctypes test_defaultdict test_deque test_descr test_dict test_dictviews test_email test_enum test_enumerate test_external_inspection test_fractions test_free_threading test_functools test_generators test_genericalias test_genericpath test_http_cookies test_interpreters test_io test_ipaddress test_iter test_itertools test_list test_lzma test_memoryview test_minidom test_opcache test_operator test_ordered_dict test_os test_pickle test_picklebuffer test_pickletools test_platform test_positional_only_arg test_random test_range test_set test_shelve test_slice test_socket test_statistics test_string test_structseq test_super test_time test_trace test_tuple test_turtle test_type_aliases test_type_params test_typing test_unittest test_urlparse test_uuid test_xml_dom_minicompat test_xml_etree test_xpickle test_zipfile test_zlib test_zoneinfo
      • tracemalloc: test_tracemalloc
    • plistlib:
      • platform: test__osx_support test_android test_asyncio test_baseexception test_cmath test_ctypes test_fcntl test_math test_mimetypes test_shutil test_startfile test_tkinter test_winreg test_wsgiref
      • webbrowser: test_webbrowser
    • tokenize: test_free_threading test_linecache test_peg_generator test_tabnanny test_tokenize test_unparse
      • inspect: test_abc test_asyncgen test_buffer test_clinic test_code test_free_threading test_grammar test_monitoring test_ntpath test_patma test_posixpath test_pyrepl test_signal test_sqlite3 test_support test_type_annotations test_yield_from test_zipimport test_zipimport_support
      • linecache: test_bdb
      • traceback: test_asyncio test_code_module test_concurrent_futures test_contextlib test_contextlib_async test_crossinterp test_dictcomps test_importlib test_listcomps test_pyexpat test_setcomps test_threadedtempfile test_threading test_unittest test_with

[ ] test: cpython/Lib/test/test_faulthandler.py (TODO: 4)

dependencies:

dependent tests: (5 tests)

  • faulthandler: test_cmd_line test_concurrent_futures test_faulthandler test_inspect test_xxtestfuzz

[ ] test: cpython/Lib/test/test_capi (TODO: 2)

dependencies:

dependent tests: (no tests depend on capi)

[x] lib: cpython/Lib/sqlite3
[x] test: cpython/Lib/test/test_sqlite3 (TODO: 14)

dependencies:

  • sqlite3

dependent tests: (2 tests)

  • sqlite3: test_dbm_sqlite3 test_sqlite3

[ ] test: cpython/Lib/test/test_free_threading (TODO: 1)

dependencies:

dependent tests: (no tests depend on free_threading)

Legend:

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@youknowone

youknowone commented Nov 1, 2026

Copy link
Copy Markdown
Member

do not add this before #9270

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@youknowdot
youknowdot force-pushed the upgrade/capi-fixture-sources-20261031 branch from bcbcc06 to 2b751f7 Compare November 3, 2026 07:12
@youknowdot
Drop unnecessary new-file import-binding framework
8fd2ba3
Keep all ten C API test files unchanged. Existing whole-file migration with exact preservation blocks reproduces both adapted modules without a separate import-binding rewrite system. The C API dependency hold remains unchanged.

Assisted-by: OpenAI Codex:model version not exposed
@youknowdot youknowdot mentioned this pull request Nov 5, 2026
Consolidate whole-file update_lib migration guards #9578
Merged
@youknowdot youknowdot changed the title Restore ten guarded C API test modules with explicit updater import bindings Restore ten guarded C API test modules Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@youknowdot @youknowone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.