Skip to content

bpo-36945: Add _PyPreConfig.configure_locale#13368

Merged
vstinner merged 2 commits into
python:masterfrom
vstinner:preconfig_configure_locale
May 17, 2019
Merged

bpo-36945: Add _PyPreConfig.configure_locale#13368
vstinner merged 2 commits into
python:masterfrom
vstinner:preconfig_configure_locale

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented May 16, 2019

Setting _PyPreConfig.configure_locale to 0 prevents Python to modify
the LC_CTYPE locale. In that case, coerce_c_locale an
coerce_c_locale_warn are set to 0.

https://bugs.python.org/issue36945

@vstinner vstinner changed the title bpo-36945: Add _PyPreConfig.configure_locale [WIP] bpo-36945: Add _PyPreConfig.configure_locale May 17, 2019
@vstinner
Copy link
Copy Markdown
Member Author

I'm not sure that we actually need this feature, see the discussion at: https://bugs.python.org/issue36945#msg342677

_PyPreConfig_InitIsolatedConfig() sets configure_locale to 0 to
prevent Python to modify the LC_CTYPE locale. In that case,
coerce_c_locale an coerce_c_locale_warn are set to 0 as well.
@vstinner vstinner changed the title [WIP] bpo-36945: Add _PyPreConfig.configure_locale bpo-36945: Add _PyPreConfig.configure_locale May 17, 2019
@vstinner
Copy link
Copy Markdown
Member Author

Aha, at least 2 users would like to get this feature: https://bugs.python.org/issue36945#msg342744

So I removed the [WIP] status of my PR. I rebased it and I plan to merge it soon.

Don't coerce the C locale if configure_locale=0
@vstinner vstinner merged commit bcfbbd7 into python:master May 17, 2019
@vstinner vstinner deleted the preconfig_configure_locale branch May 17, 2019 20:44
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