Nick Coghlan <ncogh...@gmail.com> added the comment:

Agreed - I think the biggest thing we learned from the pre-implementation in 
Python 3.7 is that the "Let's move as much config as we can to Python C API 
data types" fell down in a couple of areas:

1. The embedding application is likely to speak char* and/or wchar_* natively, 
not PyObject*, and this applies even for CPython's own current `Py_Main` 
implementation.

2. There's some core system libc interaction scaffolding that we need in place 
first, giving 3 phases, not two:

- initialise anything needed to read configuration settings from the 
environment and command line (i.e. memory allocators, interface encodings)
- initialise the things needed to execute builtin and frozen Python modules 
(core data types, random hash seed, etc)
- initialise the things needed to execute external Python modules (sys.path, 
etc)

I'll update PEP 432 so it at least mentions some of the lessons learned, and 
points to the current internal configuration API definitions in the CPython 
source tree.

----------
nosy: +ncoghlan

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36142>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to