Message310612
I made most, if not all, changes that I wanted to do. It's time to close this huge issue to continue the work in new more specific issues.
Notes on Py_Main().
(*) _PyPathConfig_Init() is called even if it's not needed (if all "Path configuration outputs" fileds of PyCoreConfig are filled).
(*) pymain_cmdline() uses _Py_CommandLineDetails structure which contains a copy of each global configuration variable like Py_UTF8Mode. Internally, the function has to "set" or "get" these variables when calling some functions like _PyPathConfig_Init().
This code is fragile. *But* pymain_read_conf() is complex, it had to read again the whole configuration a second time if the encoding changed.
It would be nice to remove global variables from _Py_CommandLineDetails to avoid the get/set dance which introduces a risk of loosing changes by mistake. But I'm not sure that it's doable?
(*) Should we make Py_FileSystemDefaultEncoding and Py_FileSystemDefaultEncodeErrors configurable in _PyCoreConfig? Same question for _Py_StandardStreamEncoding, _Py_StandardStreamErrors and PYTHONIOENCODING environment variable. |
|
Date |
User |
Action |
Args |
2018-01-24 16:32:24 | vstinner | set | recipients:
+ vstinner, barry, ncoghlan, ned.deily, eric.snow, serhiy.storchaka |
2018-01-24 16:32:24 | vstinner | set | messageid: <1516811544.18.0.467229070634.issue32030@psf.upfronthosting.co.za> |
2018-01-24 16:32:24 | vstinner | link | issue32030 messages |
2018-01-24 16:32:24 | vstinner | create | |
|