Repository navigation
Fix datetime constructor and method signature metadata - #9532
Conversation
Address the 13 datetime inspect.signature discrepancies in the actual whats_left report against CPython 3.15. Keep constructor pickle handling before normal typed binding, preserving argument destruction and subclass wrapping. Supply truthful defaults and positional parameter names. Independent source review and normal hooks passed; local compilation and runtime verification remain unavailable. Assisted-by: OpenAI Codex:model version not exposed
|
Caution Review failedThe pull request is closed.
Tip 🎯 Customize your risk assessments
✅ Automatic approvals, with your rules
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
|
Use the reviewed one-line diagnostic option from RustPython#9530 so this datetime follow-up can verify the actual 13 reported differences on its own CI head. This only enables printing comparison results already computed by the existing whats_left step; imports, builds, scans, and test behavior are unchanged. Assisted-by: OpenAI Codex:model version not exposed
Merging this PR will not alter performance
Comparing Footnotes
|
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
Address the 13 datetime
inspect.signaturedifferences in the actual Ubuntu report from #9530:timedelta,time.isoformat,datetime.isoformat,datetime.fromtimestamp, anddatetime.astimezone.date,time, anddatetimeconstructor signatures. Keep raw pickle-state handling inslot_new, before normal argument binding.fromisoformatand__format__.--signatureoutput in the existing CIwhats_leftstep, using the reviewed one-line diagnostic change from Align builtin signatures exposed by whats_left #9530. It prints results already computed by that step; imports, builds, and scans are unchanged.The constructor refactor preserves normal binding, pickle positional/keyword behavior, subclass wrapping, and argument destruction before instance allocation. No handwritten signature override, shared binder/parser change, Lib edit, or test expectation change is included.
Evidence
The comparison is against CPython 3.15.0 Clinic declarations and native constructor/default handling. Like CPython, missing native arguments can retain a sentinel while exposing their documented zero, None, or 'auto' default.
The source report measures normalized
inspect.signature, not byte-for-byte raw__text_signature__. All 13 entries have a corresponding source correction here; their disappearance still needs runtime confirmation on this head.Validation
git diff --check: passed.test_datetime, existing datetime snippets, and thewhats_leftsignature report. Draft pending that evidence.AI assistance: OpenAI Codex performed investigation, implementation, and source review; runtime limitations are disclosed above.