FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[PEP 741] gh-107954: Add PyConfig_Get() function by vstinner · Pull Request #112609 · python/cpython · GitHub

/ cpython Public

[PEP 741] gh-107954: Add PyConfig_Get() function - #112609

Closed
vstinner wants to merge 4 commits into
python:mainfrom
vstinner:config_get
Closed

[PEP 741] gh-107954: Add PyConfig_Get() function#112609
vstinner wants to merge 4 commits into
python:mainfrom
vstinner:config_get

Conversation

vstinner commented Dec 1, 2023
edited
Loading

Copy link
Copy Markdown
Member

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/

Add PyConfig_Get() and PyConfig_GetInt() functions to get the current
Python configuration.

_PyConfig_AsDict() now converts PyConfig.xoptions as a dictionary.

vstinner commented Dec 1, 2023

Copy link
Copy Markdown
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.

vstinner requested a review from a team as a code owner December 1, 2023 21:06
Comment thread Doc/c-api/init_config.rst Outdated
Comment thread Doc/c-api/init_config.rst Outdated

zooba left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

vstinner commented Dec 7, 2023

Copy link
Copy Markdown
Member Author

I created an issue for the C API Working Group to add this C API: capi-workgroup/decisions#3

Copy link
Copy Markdown
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.

vstinner closed this Dec 20, 2023
vstinner deleted the config_get branch December 20, 2023 11:09
vstinner restored the config_get branch February 8, 2024 16:05
vstinner changed the title gh-107954: Add PyConfig_Get() function [PEP 741] gh-107954: Add PyConfig_Get() function May 3, 2024

Copy link
Copy Markdown
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL