-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(vm/slot): implement Py_TPFLAGS_MANAGED_DICT
for class objects
#5949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(vm/slot): implement Py_TPFLAGS_MANAGED_DICT
for class objects
#5949
Conversation
WalkthroughThe changes introduce a new Changes
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yml ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (1)**/*.rsInstructions used from: Sources:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
🔇 Additional comments (2)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
b6f4667
to
be42c2b
Compare
let mut flags = PyTypeFlags::heap_type_flags(); | ||
// Only add HAS_DICT and MANAGED_DICT if __slots__ is not defined. | ||
if heaptype_slots.is_none() { | ||
flags |= PyTypeFlags::HAS_DICT | PyTypeFlags::MANAGED_DICT; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about splitting the patch one to contains this part and the other one contains the test_class part? I'd like to merge the test_class part as the same form of CPython patch, but this one doesn't need to be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll split the test_class part into a new PR.
a0cef6d
to
6427732
Compare
6427732
to
32b24c1
Compare
This implementation targets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Reference
Waiting for CPython Issue(PR)python/cpython#136535Summary by CodeRabbit
New Features
__slots__
.Bug Fixes
__slots__
were incorrectly assigned dictionary-related flags.Chores