| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Add unique sentinel values with copy/pickle identity, caller module capture, union support, and cycle collection. Compare constructor behavior and six upstream tests with CPython v3.15.0rc2; retain the existing Python target and bundled libraries. Assisted-by: Codex:model-version-unavailable
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used 📚 Code guidelines (1)AGENTS.md — auto-discovered No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info ⚙️ Run configuration
Reviewing files that changed from the base of the PR and between ada43c4 and 5715732. 📒 Files selected for processing (6)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 Walkthrough WalkthroughThe VM adds a sentinel type with construction, representation, copy, reduction, and union operations. It registers the type in the builtins module and recognizes sentinel instances as union operands. ChangesSentinel builtin
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Merge Risk: ⚪ Minimal · up to 57157 No actionable merge-blocking risk remains in the reviewed sentinel implementation; it is ready to merge after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to 57157 The change stays within existing Python object, union, and serialization behavior. No new privilege grant or security-boundary bypass was established. Residual uncertainty concerns native object cleanup and concurrent lifecycle behavior, which were assessed from source rather than exercised at runtime. Retained concerns Security Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
❌ Failed checks (1 warning)
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. ❤️ ShareComment @coderabbitai help to get the list of available commands. |
Sorry, something went wrong.
Merging this PR will not alter performance✅ 62 untouched benchmarks Comparing youknowdot:cpython-315-sentinel (5715732) with main (f46ba48) Footnotes
|
Sorry, something went wrong.
| # Sentinel cases copied unchanged from CPython v3.15.0rc2 Lib/test/test_builtin.py. | ||
| # https://github.com/python/cpython/blob/v3.15.0rc2/Lib/test/test_builtin.py |
There was a problem hiding this comment.
When RustPython decides to target CPython 3.15 (rather than CPython 3.14), the file in question will be updated by a semi-automated process.
Sorry, something went wrong.
There was a problem hiding this comment.
this can be simply replaced by test_builtin. so removing will be fine
Sorry, something went wrong.
Rely on the canonical Lib/test/test_builtin.py sentinel cases when the standard library is updated, as requested in PR RustPython#8945 review. Remove the custom snippet without changing the runtime implementation or existing standard-library tests. Assisted-by: Codex:model-version-unavailable
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Implement the native sentinel(name, /, *, repr=None) builtin described by PEP 661, as an independent prerequisite for the Python 3.15 standard-library migration.
This branch is based directly on RustPython ada43c4f82b9df4e260f1368038c31cd55c4a61e. It contains only the native sentinel implementation and its snippet. It does not change the advertised Python version, standard-library sources, import machinery, compile/module behavior, or generated workflows.
Reference and attribution
Behavior was compared with CPython v3.15.0rc2, commit 435c9e5a798c99653e3ab64ce29baed0e4f3dfee:
The six test_sentinel* methods are copied from that CPython test source; their assertions and AST semantics are preserved. Additional edge tests cover module capture, self/mutual/repr GC cycles, string subclasses, Unicode, signature/documentation, and identity/protocol behavior.
Validation
All commands below use the independent branch and its unchanged 3.14 Lib:
The full snippet aggregate (pytest -v --timeout=60, CPython 3.14.7 plus the isolated RustPython binary) reports 469 passed, 13 failed. It is not a green aggregate result:
Both sentinel harness cases and both SQLite cases pass. The CPython 3.14 sentinel harness case validates the version guard, while the separate 3.15rc2 run executes all 12 tests. All failing test source files are unchanged.
The remaining isolated-branch Rust checks also pass:
GitHub CI, CodSpeed, and pyperformance currently require maintainer approval for this fork; they have not run. This remains a draft for review.
Limitations
This change adds the runtime builtin and union support; it does not claim complete Python 3.15 compatibility or add third-party static type-checker support. Validation is on Linux x86_64; other platforms have not been exercised here.
AI assistance
OpenAI Codex assisted with implementation, CPython comparison, tests, review, and this PR description under maintainer direction. The runtime did not expose the exact model version. Reported checks are automated Linux x86_64 verification; no additional human-use or untested-platform verification is claimed.
Summary by CodeRabbit