-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-41073: PyType_GetSlot() could accept static types. #21395
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
Conversation
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.
This will not work with static types. Try adding some tests, and look at how PyHeapTypeObject
is different from PyTypeObject
. You should see why.
Sadly I don't have time right now to go into detail, but I'll be happy to add more later. Let me know if you get stuck.
#define Py_tp_version_tag 96 | ||
#define Py_tp_weaklist 97 | ||
#define Py_tp_weaklistoffset 98 | ||
#endif |
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.
These should not be part of the limited API. See Py_bf_getbuffer
above for how to exclude them.
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.
ok, I will update it.
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.
Looks like we juse need define it and it don't need to be excluded, no?
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.
Hi, petr. I create a test module(_testgettypeslots) to see the blocks, but I am not get stuck,: shihai1991#18
Do we need add some special
test cases?
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.
Hi, petr. Due to my stupied rebase operation, I decide to create a new PR: #21931
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Copy that, Let me try it. |
…strings (pythonGH-21369) * Document is_annotate() and update doc strings * Move quotes to the next line. Co-authored-by: Pablo Galindo <[email protected]> Co-authored-by: Pablo Galindo <[email protected]>
…gs() (pythonGH-19378)" (pythonGH-21390) This partially reverts commit 45ec5b9.
…onGH-21401) The running loop holder cache variable was always set to NULL when calling set_running_loop. Now set_running_loop saves the newly created running loop holder in the cache variable for faster access in get_running_loop. Automerge-Triggered-By: @1st1
…bject (pythonGH-21240) The issue is triggered by the bytearray() + bytearray() operation. Detected by GCC 10 static analysis tool.
…ation page (pythonGH-21413) Automerge-Triggered-By: @ericvsmith
The >>> as the last line serve no purpose and are not colored correctly by Sphinx.
Keywords are present in the main module tab completion lists generated by rlcompleter, which is used by REPLs on *nix. Add all keywords to IDLE's main module name list except those already added from builtins (True, False, and None) . This list may also be used by Show Completions on the Edit menu, and its hot key. Rewrite Completions doc. Co-authored-by: Cheryl Sabella <[email protected]>
* Clarify __deepcopy__ memo dict argument usage * Add full stop
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
Sorry for my terrible PR~ |
"rebase" creates this type of trouble sometime. You can use "merge" instead. |
Thanks a million, Inada. It's very useful to me. I haven't found some useful info in google and not sure |
You might like git lola. I use it a lot and I probably couldn't use git without it. It displays your git history as a nice tree that very clearly shows what's going on with branches and merges. |
Thanks. I will try to use it ;) The problem in this PR is that I can not easy use |
https://bugs.python.org/issue41073