← 返回首页
[WIP] gh-107954: Add _PyConfig_Parse() by vstinner · Pull Request #110145 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

[WIP] gh-107954: Add _PyConfig_Parse()#110145

Closed
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:config_parse
Closed

[WIP] gh-107954: Add _PyConfig_Parse()#110145
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:config_parse

Conversation

vstinner commented Sep 30, 2023
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Member Author

Copy link
Copy Markdown
Member Author

It may be interesting to store unknown variables in a dictionary and expose it somewhere, similar to sys._xoptions. It would allow implement https://discuss.python.org/t/fr-allow-private-runtime-config-to-enable-extending-without-breaking-the-pyconfig-abi/18004 use case: private vendor-specific variables.

For that, the configuration format should have a deterministic way to get the type of unknown variable. In sys._xoptions, the key is a string and the value is a string or True if there is no value.

Looking at TOML specification, I see the following types would be interesting to support:

  • boolean
  • integer
  • string
  • array of string

vstinner commented Oct 2, 2023

Copy link
Copy Markdown
Member Author

I abandon this approach based on text configuration: see https://discuss.python.org/t/fr-allow-private-runtime-config-to-enable-extending-without-breaking-the-pyconfig-abi/18004/24 for the rationale.

Let's focus on PR #110176 PyInitConfig API instead which seem to be please more people.

vstinner closed this Oct 2, 2023
vstinner deleted the config_parse branch October 2, 2023 16:09
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.

1 participant

Footer

© 2026 GitHub, Inc.