This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients Decorater, eric.snow, ncoghlan, serhiy.storchaka, vstinner
Date 2017-11-22.10:26:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1511346409.35.0.213398074469.issue32096@psf.upfronthosting.co.za>
In-reply-to
Content
Victor, please stop trying to conflate the two questions of "How should we fix the current Py_DecodeLocale regression before 3.7.0a3?" and "What do we want to do long term?".

They're far from being the same question, and answering the second one properly is going to be much harder and more involved than just doing the bare minimum needed to make the previously supported embedding logic work again (even if it means postponing some of the dynamic allocator changes we'd like to make).

Omitting PYTHONHOME and PYTHONPATH from the core config is deliberate, as the interpreter doesn't support external imports yet when just the core has been initialized - only builtin and frozen ones.

Anything related to external imports should ultimately end up in the main interpreter configuration: https://www.python.org/dev/peps/pep-0432/#supported-configuration-settings

Longer term, I also want to rewrite getpath.c in Python (or at least primarily using Python lists and strings via the C API instead of relaying C arrays and C string manipulation functions).

However, our work on refactoring Py_Main has also shown me that we're going to need some additional structs to hold the raw(ish) command line arguments and environment variables in order to easily pass them around to other internal configuration APIs.

Modules/main.c already defines _Py_CommandLineDetails for the command line settings: https://github.com/python/cpython/blob/master/Modules/main.c#L382

We *don't* currently have anything like that for environment variables, not even the ones which are "read once at startup, then never read them again".
History
Date User Action Args
2017-11-22 10:26:49ncoghlansetrecipients: + ncoghlan, vstinner, eric.snow, serhiy.storchaka, Decorater
2017-11-22 10:26:49ncoghlansetmessageid: <1511346409.35.0.213398074469.issue32096@psf.upfronthosting.co.za>
2017-11-22 10:26:49ncoghlanlinkissue32096 messages
2017-11-22 10:26:49ncoghlancreate