GeezerVison is showing github.com — Add checked legacy Python 3.15 text signature overrides by youknowdot · Pull Request #9756 · RustPython/RustPython
Conversation
youknowdot
commented
Nov 8, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
This is the deferred override half requested in #9756 (comment). The generator-supported corrections have been split into #9795, an independent PR to merge first. Both branches are based directly on main.
- Add an explicit
text_signature attribute for legacy signatures that the generator cannot express.
- Apply it to the 21
str/bytes/bytearray search and prefix/suffix methods with nested optional groups, and to _csv.reader, writer, and register_dialect.
- Validate overrides against actual binding metadata at compile time: parameter count, requiredness, receiver markers, kinds, keyword names, and known flattened binders. CSV's documented keyword dialect requires a matching optional positional parameter plus an actual keyword collector.
- Keep the ordinary
FromArgs derives, metadata, converters, dispatch, and CSV's delayed validation unchanged. The previous py_optional_group and DefaultRepr::OptionalGroup implementation is removed.
This stays draft for the final text-signature phase. The supported override grammar is intentionally narrow: positional parameters, /, literal defaults, **kwargs, and nested trailing optional groups. Ordinary symbolic/default corrections continue to use the generator.
Validation
At final head 4f745ac05:
- Configured commit hooks passed.
- Full workspace Rust tests and doctests passed: 1,549 passed and 20 ignored across their reported groups. This includes compilation of all 24 override annotations and the four real compile-fail rustdoc cases.
- C-API tests passed: 149 passed, 2 ignored.
- Strict workspace/all-target and separate C-API Clippy passed.
- Release build passed.
- Signature and CSV snippets passed on RustPython and CPython 3.15.1; both selected RustPython pytest cases passed.
test_str test_bytes test_inspect test_csv passed: all 4 files, 992 tests run, 77 skipped.
- Both split branches merge cleanly and preserve all original Python test statements across the two PRs.
All native checks used a clean rebuild of every workspace package. No source fix or additional push was needed after publication. GitHub CI is tracked separately; its final results are not claimed here.
AI assistance
Split, override implementation, review, and validation were performed with Codex. Original grouped-signature and CSV binding regressions are preserved; the CSV invalid-name error-text regression moved with its runtime fix to the independent generated-signature PR.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 8, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Important
Draft PR not reviewed
Draft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration:
reviews:
auto_review:
drafts: true
Pre-merge checks: 1 · 1
-
Failed checks: 1 inconclusive
| Check name |
Status |
Explanation |
Resolution |
| Title check |
 |
This assessment has not completed. The check will be retried on the next pre-merge check run. |
|
Passed checks: 1 passed
-
| Check name |
Status |
Explanation |
| Description Check |
 |
Check skipped - CodeRabbit’s high-level summary is enabled. |
- 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
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 8, 2026
codspeed
Bot
commented
Nov 10, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Merging this PR will not alter performance
✅ 62 untouched benchmarks
⏩ 4 skipped benchmarks1
Comparing youknowdot:fix/bulk-signatures-20261109 (4f745ac) with main (dd8c343)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Please split this PR in two.
1. Signatures that need a text-signature override. This is the py_optional_group part: the sub[, start[, end]] / prefix[, …] / suffix[, …] signatures of the str/bytes/bytearray search and prefix/suffix methods. Clinic cannot generate these; CPython supplies them with @text_signature (e.g. Objects/unicodeobject.c:11493, Objects/bytesobject.c:2012) and shares them through Clinic clones (str.find as unicode_find = str.count). The _csv reader/writer/register_dialect display, which differs from the actual binding, belongs here too. Instead of display-only metadata inside FromArgs (DefaultRepr::OptionalGroup, the PARAMS ≠ BINDING_PARAMS impl), these should use a dedicated override that is checked against the binding at compile time. That will be the last piece of the text-signature work, so we will not merge it now.
2. Everything else, i.e. the signatures the generator can produce: the symbolic py_defaults (array, blake2, codecs, faulthandler, marshal, select, warnings, IO seek), the _imp.create_dynamic and struct-sequence parameter names, the Future/Task add_done_callback context default and callback-context fix, and the CSV error-text correction. Please open this as a separate PR. We will merge it first.
— commented by Claude
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
youknowdot
changed the title
Match grouped and symbolic Python 3.15 text signatures in bulk
Add checked legacy Python 3.15 text signature overrides
Nov 11, 2026
youknowone
pushed a commit
that referenced
this pull request
Nov 11, 2026
Split the generator-supported corrections from the legacy display overrides in #9756. Preserve the callback context distinction between omission and explicit None, and fix CSV invalid-name error text.
Assisted-by: OpenAI Codex: model version not exposed
Keep optional-group and CSV display signatures separate from argument binding. Validate explicit overrides against binding metadata in a const context and preserve legacy call behavior.
Assisted-by: OpenAI Codex: model version not exposed
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
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.
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.
|