GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [WIP] gh-107954: Add _PyConfig_Parse() by vstinner · Pull Request #110145 · python/cpython

Conversation

@vstinner

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

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: [C API] PEP 741: Add PyInitConfig C API to customize the Python initialization #107954

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot mentioned this pull request Sep 30, 2023
[C API] PEP 741: Add PyInitConfig C API to customize the Python initialization #107954
Closed
@vstinner
vstinner force-pushed the config_parse branch from fa98a1c to 96cb693 Compare September 30, 2023 15:41
@vstinner vstinner added the skip news label Sep 30, 2023
@vstinner
pythongh-107954: Add _PyConfig_Parse()
e6e4e5c
@vstinner
vstinner force-pushed the config_parse branch from 96cb693 to e6e4e5c Compare September 30, 2023 20:33
@vstinner

vstinner commented Sep 30, 2023

Copy link
Copy Markdown
Member Author

Discussion: https://discuss.python.org/t/fr-allow-private-runtime-config-to-enable-extending-without-breaking-the-pyconfig-abi/18004

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Sep 30, 2023

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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner mentioned this pull request Oct 1, 2023
gh-109595: Add -Xcpu_count=<n> cmdline for container users #109667
Merged
@vstinner

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner closed this Oct 2, 2023
@vstinner
vstinner deleted the config_parse branch October 2, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently will be requested when the pull request is marked ready for review ericsnowcurrently is a code owner
@FFY00 FFY00 Awaiting requested review from FFY00 FFY00 will be requested when the pull request is marked ready for review FFY00 is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@vstinner
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.