Repository navigation
Migrate in-tree Hashable implementations to fixed __hash__ slots - #10211
Draft
youknowone wants to merge 5 commits into
Draft
youknowone wants to merge 5 commits into
youknowone wants to merge 5 commits into
Conversation
Register the exact native HashFunc directly with the Python name. Keep the Hashable trait implementations for Rust callers and share their calculation with the native slot. Assisted-by: ChatGPT:version-not-exposed
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
Keep each hash calculation in the fixed-signature __hash__ method. Use the same direct repr adapters as the companion Representable migration in these two payloads. Assisted-by: ChatGPT:version-not-exposed
Keep the native slot signature and move range formatting directly into the registered slot. Assisted-by: ChatGPT:version-not-exposed
Integrate the merged direct __repr__ implementation without changing formatting. Keep the legacy Hashable trait deprecated for downstream migration, and do not make weak proxies hashable. Assisted-by: ChatGPT:version-not-exposed
__hash__ slots with #[pymethod]Keep the direct hash migration unchanged while rolling in the macOS and browser WASM fixes from RustPython#10213 and current compiler main. Assisted-by: ChatGPT:version-not-exposed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Convert the in-tree
Hashableimplementations to fixed-signature native#[pymethod] __hash__slots. Keep the legacy Rust trait as deprecated migration guidance. Preserve cached hashes, existing typed frozenset and timedelta calls, and unhashable weak proxies. This branch incorporates merged #10212 without changing its repr formatting or registered signatures.The existing
vm_special_method.pysnippet covers direct descriptors, inherited/dynamic overrides, cached containers, and exception propagation. Hooks passed. The full candidate passed strict Linux Clippy before integration with merged #10212; CPython 3.15.2 and the earlier Rust control passed the snippet and 59 canonical hash/range tests. Exact integrated-head validation is delegated to CI; no performance claim.Assisted by ChatGPT.