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 — [PEP 741] gh-107954: Add PyConfig_Get() function by vstinner · Pull Request #112609 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented Dec 1, 2023 •
edited
Loading

Uh oh!

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

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

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

📚 Documentation preview 📚: https://cpython-previews--112609.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

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

All reactions
@vstinner
pythongh-107954: Add PyConfig_Get() function
36dcd34
Add PyConfig_Get() and PyConfig_GetInt() functions to get the current
Python configuration.

_PyConfig_AsDict() now converts PyConfig.xoptions as a dictionary.
@bedevere-app bedevere-app Bot added the awaiting core review label Dec 1, 2023
@bedevere-app bedevere-app Bot mentioned this pull request Oct 1, 2023
[C API] PEP 741: Add PyInitConfig C API to customize the Python initialization #107954
Closed
@vstinner

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.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner vstinner mentioned this pull request Dec 1, 2023
[PEP 741] gh-107954: Add PyInitConfig C API #110176
Closed
@vstinner
Fix Windows build: add Modules\_testcapi\config.c
7c4a66a
@vstinner
vstinner requested a review from a team as a code owner December 1, 2023 21:06
zooba
zooba reviewed Dec 4, 2023
View reviewed changes
Comment thread Doc/c-api/init_config.rst Resolved

Uh oh!

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

Comment thread Doc/c-api/init_config.rst Resolved

Uh oh!

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

@vstinner
Update the doc
4a34481
zooba
zooba approved these changes Dec 7, 2023
View reviewed changes

@zooba zooba left a comment

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Dec 7, 2023
@vstinner vstinner mentioned this pull request Dec 7, 2023
Add PyConfig_Get() and PyConfig_GetInt() functions capi-workgroup/decisions#3
Closed
1 of 4 tasks
@vstinner

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner
mention config_get_sys_write_bytecode() around write_bytecode spec
51c67ff
@vstinner

vstinner commented Dec 20, 2023

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.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner vstinner closed this Dec 20, 2023
@vstinner
vstinner deleted the config_get branch December 20, 2023 11:09
@vstinner vstinner mentioned this pull request Jan 16, 2024
[C API] Deprecate legacy API for configure Python initialization #88279
Closed
@vstinner
vstinner restored the config_get branch February 8, 2024 16:05
@vstinner vstinner changed the title gh-107954: Add PyConfig_Get() function [PEP 741] gh-107954: Add PyConfig_Get() function May 3, 2024
@vstinner

vstinner commented Aug 29, 2024

Copy link
Copy Markdown
Member Author

Since this PR is closed, I created a new PR to implement PEP 741: #123472

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner vstinner mentioned this pull request Aug 29, 2024
gh-107954, PEP 741: Add PyConfig_Get() function #123472
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@zooba zooba zooba approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

awaiting merge

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.

2 participants

@vstinner @zooba
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.