Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-106320: Re-add some PyLong/PyDict C-API functions#111162
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…) and _PyLong_GCD() to the public header files since they are used by third-party packages and there is no efficient replacement.Seepython#111140Seepython#111139
I would prefer to take it as an opportunity to add a nice public API for that. In the meanwhile (until next alpha release), you can just use the internal C API. |
add a nice public API for that Oh, I'd be happy to. I see the revert as a way to make sure there *is* an API until we have something to replace it. For which, as Serhiy noted, the design and discussion can take arbitrarily long. |
Just for the record, I micro-benchmarked
This suggests to me that making |
I would prefer adding these back, so that we can take our time to add a proper replacement. |
…lic one is designed.
encukou left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 still don't see the reason why this API was removed.PEP-387 says that itcan be removed, not that itshould.
We don't have a good replacement for this API. After we add that, it'll be time to start telling people to change their code.
I take@gvanrossum'scomment on another issue as support for reverting the removal:
I strongly prefer revert over fix, for removed APIs that cause problems.
Yes, I plan to add public APIs to replace these useful functions. I created multiple issues to track that: issues listed in the PR description. |
…#111162)*pythongh-106320: Re-add _PyLong_FromByteArray(), _PyLong_AsByteArray() and _PyLong_GCD() to the public header files since they are used by third-party packages and there is no efficient replacement.Seepython#111140Seepython#111139*pythongh-111262: Re-add _PyDict_Pop() to have a C-API until a new public one is designed.
…#111162)*pythongh-106320: Re-add _PyLong_FromByteArray(), _PyLong_AsByteArray() and _PyLong_GCD() to the public header files since they are used by third-party packages and there is no efficient replacement.Seepython#111140Seepython#111139*pythongh-111262: Re-add _PyDict_Pop() to have a C-API until a new public one is designed.
Uh oh!
There was an error while loading.Please reload this page.
Re-add _PyLong_FromByteArray(), _PyLong_AsByteArray(),_PyLong_GCD() and _PyDict_Pop() to the public header files.
They are used by third-party packages and there is no efficient replacement.
See#111140
See#111139
See#111262