Message 342735 - Python tracker

Message342735

Author vstinner
Recipients ncoghlan, steve.dower, twouters, vstinner
Date 2019-05-17.16:48:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1558111729.57.0.999865803491.issue36945@roundup.psfhosted.org>
In-reply-to
Content
Steve:
> Imagine you're an existing application and you want to embed Python. Why would you ever want it to suddenly change your global settings like this?

I have a very good news for you :-) Slowly but steadily, we converge on a agreement ;-)

The more time I spend on PEP 587, the more I think that the following use cases are too different and "incompatible":

* customized Python interpreter: behaves as the "regular Python"
* Embedded Python

I drafted "Isolate Python" in my PEP 587. With subtle options like configure_c_stdio, parse_argv and now configure_locale, it seems like we really need two *separated* these two configurations.

I implemented exactly that in PR 13388, I added 2 functions:

* _PyCoreConfig_InitPythonConfig(): provide a default configuration which parses command line arguments, enable UTF-8 Mode depending on the locale, read global configuration variables, read environment variables, etc.

* _PyCoreConfig_InitIsolateConfig(): isolated from the system, ignore command line arguments, ignore global configuration variables, leave the LC_CTYPE locale and C streams unchanged, etc.

I'm working on an update of my PEP to better describe that.

--

So I understand that this option is needed and you should prefer to turn it off by default in _PyCoreConfig_InitIsolateConfig.
History
Date User Action Args
2019-05-17 16:48:49vstinnersetrecipients: + vstinner, twouters, ncoghlan, steve.dower
2019-05-17 16:48:49vstinnersetmessageid: <1558111729.57.0.999865803491.issue36945@roundup.psfhosted.org>
2019-05-17 16:48:49vstinnerlinkissue36945 messages
2019-05-17 16:48:49vstinnercreate