Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Nov 23, 2017

* Py_Main() now reads the PYTHONHOME environment variable
* Add _Py_GetPythonHomeWithConfig() private function
* init_filters() doesn't get the current core configuration from the
  current interpreter or Python thread anymore. Pass explicitly the
  configuration to _PyWarnings_InitWithConfig().
* _Py_InitializeCore() now fails on _PyWarnings_InitWithConfig()
  failure.
* Pass configuration as constant
@vstinner vstinner requested a review from ncoghlan November 23, 2017 01:47
@ncoghlan ncoghlan changed the title bpo-32030: Add _PyCoreConfig.pythonhome bpo-32030: Add _PyMainInterpreterConfig.pythonhome Nov 23, 2017
Copy link
Contributor

@ncoghlan ncoghlan left a comment

Choose a reason for hiding this comment

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

I tweaked the PR title to use the right struct name, so this looks good to me!


wchar_t *
Py_GetPythonHome(void)
_Py_GetPythonHomeWithConfig(const _PyMainInterpreterConfig *config)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I actually like this API design, but since it's an internal API, I don't have any obviously better ideas, and we expect further refactoring of this code in the future, I'm also not going to quibble over it.

@vstinner vstinner merged commit 1f15111 into python:master Nov 23, 2017
@vstinner vstinner deleted the pymain_pythonhome branch November 23, 2017 09:43
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