Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-38234: Fix PyConfig_Read() when Py_SetPath() was called #16298

Merged
merged 1 commit into from Sep 20, 2019

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Sep 20, 2019

  • If Py_SetPath() has been called, _PyConfig_InitPathConfig() now
    uses its value.
  • Py_Initialize() now longer copies path configuration from PyConfig
    to the global path configuration (_Py_path_config).

https://bugs.python.org/issue38234

Copy link
Member

@pablogsal pablogsal left a comment

LGTM

* If Py_SetPath() has been called, _PyConfig_InitPathConfig() now
  uses its value.
* Py_Initialize() now longer copies path configuration from PyConfig
  to the global path configuration (_Py_path_config).
@vstinner
Copy link
Member Author

vstinner commented Sep 20, 2019

I rebased my PR on top of commit c422167.

@vstinner vstinner merged commit e267793 into python:master Sep 20, 2019
@vstinner vstinner deleted the pathconfig branch Sep 20, 2019
@miss-islington
Copy link
Contributor

miss-islington commented Sep 20, 2019

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 20, 2019
…-16298)

* If Py_SetPath() has been called, _PyConfig_InitPathConfig() now
  uses its value.
* Py_Initialize() now longer copies path configuration from PyConfig
  to the global path configuration (_Py_path_config).
(cherry picked from commit e267793)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
@bedevere-bot
Copy link

bedevere-bot commented Sep 20, 2019

GH-16312 is a backport of this pull request to the 3.8 branch.

vstinner added a commit that referenced this pull request Sep 21, 2019
…-16298) (GH-16313)

* bpo-38234: Remove _PyPathConfig.dll_path (GH-16307)

The DLL path is not computed from any user configuration and cannot
be configured by PyConfig. Instead, add a new _Py_dll_path global variable.

Remove _PyConfig_SetPathConfig(): replaced with _PyPathConfig_Init().

Py_Initialize() now longer sets the "global path configuration",
but only initialize _Py_dll_path.

(cherry picked from commit c422167)

* bpo-38234: Fix PyConfig_Read() when Py_SetPath() was called (GH-16298)

* If Py_SetPath() has been called, _PyConfig_InitPathConfig() now
  uses its value.
* Py_Initialize() now longer copies path configuration from PyConfig
  to the global path configuration (_Py_path_config).

(cherry picked from commit e267793)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants