Skip to content

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

Merged
vstinner merged 1 commit intopython:masterfrom
vstinner:pathconfig
Sep 20, 2019
Merged

bpo-38234: Fix PyConfig_Read() when Py_SetPath() was called#16298
vstinner merged 1 commit intopython:masterfrom
vstinner:pathconfig

Conversation

@vstinner
Copy link
Copy Markdown
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
Copy Markdown
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

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

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
Copy Markdown
Member Author

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 September 20, 2019 23:50
@miss-islington
Copy link
Copy Markdown
Contributor

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 <[email protected]>
@bedevere-bot
Copy link
Copy Markdown

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.

5 participants