Skip to content

Navigation Menu

Sign in
Appearance settings

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

Provide feedback

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

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-34523: Use _PyCoreConfig instead of globals#9005

Merged
vstinner merged 1 commit into
python:masterpython/cpython:masterfrom
vstinner:use_configCopy head branch name to clipboard
Aug 29, 2018
Merged

bpo-34523: Use _PyCoreConfig instead of globals#9005
vstinner merged 1 commit into
python:masterpython/cpython:masterfrom
vstinner:use_configCopy head branch name to clipboard

Conversation

@vstinner

@vstinner vstinner commented Aug 29, 2018

Copy link
Copy Markdown
Member

Get configuratiom the core configuration of the interpreter, rather
than getting global configuration variables. For example, replace
Py_QuietFlag with core_config->quiet.

https://bugs.python.org/issue34523

Get configuratiom the core configuration of the interpreter, rather
than getting global configuration variables. For example, replace
Py_QuietFlag with core_config->quiet.
@bmwiedemann

bmwiedemann commented Sep 27, 2018

Copy link
Copy Markdown
Contributor

Unfortunately, the description does not tell much about "Why this is good?" (edit: link went to different PR)
Does it help reduce unexpected influences from other places in code?

@vstinner

Copy link
Copy Markdown
Member Author

Unfortunately, the description does not tell much about "Why this is good?" (edit: link went to different PR)
Does it help reduce unexpected influences from other places in code?

For the long term, I plan to deprecate global variables, especially global configuration variables like Py_QuietFlag. Moreover, I would like to support running two Python interpreters inside the same process but with two different configurations.

See https://www.python.org/dev/peps/pep-0554/ for more information about Eric Snow's project @ericsnowcurrently.

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.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.