-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
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
bpo-1635741: prepare for multi-phase init for unicodedata #21418
Conversation
|
@shihai1991 In CPython source code, all of the usages are accounted for. Technically you are right that extension modules outside of CPython could be calling these capsule methods. I don't know how to measure the likelyhood of that but it would be a runtime error. I can turn it into a compile-time error by replacing the capsule methods with small wrappers that have one fewer argument. Then those extension modules if they exist can conditionally compile based on the cpython version. |
We need to be careful to break the backward compatibility. Hi, victor, what's your opinion? |
Leave C extensions which expose a capsule unchanged, until the capsule API is modified to pass the module to functions exported as capsule. I suggest to open an issue to propose to enhance the capsule API for that. |
@vstinner In that case I think this PR is ready to be merged |
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 dislike this approach and would prefer to enhance the capsule API to pass the module instance to function exported as a capsule API.
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 |
See this PR for a discussion of this change