-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
[PEP 741] gh-107954: Add PyConfig_Get() function #112609
Conversation
Add PyConfig_Get() and PyConfig_GetInt() functions to get the current Python configuration. _PyConfig_AsDict() now converts PyConfig.xoptions as a dictionary.
This change doesn't add the new functions to the limited C API yet. They can be added in a follow-up PR. |
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.
LGTM
I created an issue for the C API Working Group to add this C API: capi-workgroup/decisions#3 |
I expected such API (two functions) to be simple to agree on, but apparently, it's more completed than expected. @encukou now suggests writing a PEP for adding these two functions. I'm already struggling to get a consensus on my PEP 737 – Unify type name formatting. I don't have the bandwidth to fight for too many APIs in parallel. I prefer to close the PR for now. I may reopen it when I will have more bandwidth to look into this topic again. |
Since this PR is closed, I created a new PR to implement PEP 741: #123472 |
Add PyConfig_Get() and PyConfig_GetInt() functions to get the current Python configuration.
_PyConfig_AsDict() now converts PyConfig.xoptions as a dictionary.
Discussion: https://discuss.python.org/t/fr-allow-private-runtime-config-to-enable-extending-without-breaking-the-pyconfig-abi/18004
📚 Documentation preview 📚: https://cpython-previews--112609.org.readthedocs.build/