[PEP 741] gh-107954: Add PyConfig_Get() function#112609
Closed
vstinner wants to merge 4 commits intopython:mainfrom
Closed
[PEP 741] gh-107954: Add PyConfig_Get() function#112609vstinner wants to merge 4 commits intopython:mainfrom
vstinner wants to merge 4 commits intopython:mainfrom
Conversation
Add PyConfig_Get() and PyConfig_GetInt() functions to get the current Python configuration. _PyConfig_AsDict() now converts PyConfig.xoptions as a dictionary.
Member
Author
|
This change doesn't add the new functions to the limited C API yet. They can be added in a follow-up PR. |
zooba
reviewed
Dec 4, 2023
4 tasks
Member
Author
|
I created an issue for the C API Working Group to add this C API: capi-workgroup/decisions#3 |
Member
Author
|
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. |
Member
Author
|
Since this PR is closed, I created a new PR to implement PEP 741: #123472 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/