Skip to content

bpo-36763: _PyCoreConfig_SetPyArgv() preinitializes Python#13037

Merged
vstinner merged 1 commit into
python:masterfrom
vstinner:config_preinit
May 2, 2019
Merged

bpo-36763: _PyCoreConfig_SetPyArgv() preinitializes Python#13037
vstinner merged 1 commit into
python:masterfrom
vstinner:config_preinit

Conversation

@vstinner

@vstinner vstinner commented May 1, 2019

Copy link
Copy Markdown
Member

_PyCoreConfig_SetPyArgv() now pre-initializes Python if needed to
ensure that the locale encoding is properly configured.

  • Add _Py_PreInitializeFromPyArgv() internal function.
  • Add 'args' parameter to _Py_PreInitializeFromCoreConfig()

https://bugs.python.org/issue36763

@vstinner

vstinner commented May 1, 2019

Copy link
Copy Markdown
Member Author

I'm not sure about this change since it can lead to mojibake:
python/peps#1018 (comment)

_PyCoreConfig_SetPyArgv() and _PyCoreConfig_SetWideString() now
pre-initialize Python if needed to ensure that the locale encoding is
properly configured.

* Add _Py_PreInitializeFromPyArgv() internal function.
* Add 'args' parameter to _Py_PreInitializeFromCoreConfig()
@vstinner
vstinner merged commit 70005ac into python:master May 2, 2019
@vstinner
vstinner deleted the config_preinit branch May 2, 2019 19:25
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.

3 participants