I rewrote Py_Main() in two large commits. The code isn't perfect yet, for example, init_sys_streams() still reads the PYTHONIOENCODING environment variable. IMHO it should be read earlier. But as soon, my changes should allow to fix such issues much more easily.
Since I was now able to implement my -X dev option in bpo-32043, I don't plan to push further changes in short term on Py_Main().
I keep this issue open a little bit to check if everything is fine on buildbots, and check if someone has complains :-) |