Repository navigation
Fix reported regex and struct text signatures - #9534
Conversation
Render the existing StringPos zero default from its typed value, use named variadic values for struct packing, and derive the Struct constructor signature from its typed initializer while retaining deferred binding in slot_init. Add pure generated-metadata tests and expose existing whats_left signature warnings in CI. Native builds and runtime tests remain pending CI. Assisted-by: OpenAI Codex:model version not exposed
|
Caution Review failedThe pull request is closed.
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. CodeRabbit Verify
|
Merging this PR will not alter performance
Comparing Footnotes
|
Fix the E0277 found by Windows CI: pyclass implements PyClassImpl for Pattern, forwarding the wrapped method definitions. Keep every metadata assertion unchanged. Assisted-by: OpenAI Codex:model version not exposed
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Summary
Fix 13 signature mismatches reported by
whats_left --signaturein #9530: sixre.Patternmethods, two bound aliases infractions, and five_structAPIs.StringPos(0)default through typed metadata; preserve integer conversion, negative-position clamping, andendpos=sys.maxsize.valuesand module format parametersformat.Struct(format)from its typed initializer, retaining the implicit-initialization bypass before argument binding inslot_init.matchalias,Struct, and four packing functions).--signatureoutput flag. No new scan, import, or build step.Reference: CPython 3.15.0
d220409a13b77de7a6c30abe16ea90db01528edc,Modules/_sre/clinic/sre.c.h,Modules/clinic/_struct.c.h, and_struct.c::s_init.Verified results
At head
9f565fc8c91a1efcdd3ab5630993cd6a325930b5, CI run 41454455490 completed successfully: all 24 jobs passed. CodSpeed also passed; pyperformance was skipped by its existing conditions.Same-platform normalized
inspect.signaturemismatches versus #9530's report-only head68646843423633e60bd54c6d4150db953b303804:Each platform removes exactly the same 13 targeted entries. This compares normalized signatures, not raw text alone.
test_re,test_struct,test_fractions, andtest.test_inspect.test_inspectsuites.git diff --checkpassed. Native compilation/runtime validation was performed by CI, not locally.9f565fc8selects thePatternpayload's generated metadata; every assertion remains intact. The corrected head above is fully green.Integration note: the
NameValuesexport shares an import-list hunk with the concurrent builtin-signature cohort'sNameObjects; retain both names when combining.AI assistance
Implementation, tests, source analysis, CI investigation, and this description were AI-assisted using OpenAI Codex (model version not exposed). No
Libtests, assertions, or snippets were changed.