[issue38322] Azure Pipelines: appx tests fail: init_fs_encoding: failed to get the Python codec of the filesystem encoding
STINNER Victor
report at bugs.python.org
Mon Sep 30 15:46:33 EDT 2019
STINNER Victor <vstinner at python.org> added the comment:
> The bug was probably exposed due to a change in path initialization (there's been a few changes here recently ;) ) that stopped normalising prefix. You can see that sys.executable in your dumped path has additional "." in the path, and that's never been the case before - they're always cleaned up earlier than that.
Yeah, I had to modify a lot of "path config" code to fix many bugs (regressions compared to Python 3.7). I also added the first tests on the "path configuration" in test_embed.
I checked why sys.executable is not normalized in the the "appx build". PC\python_uwp.cpp calls set_process_name() which sets PyConfig.executable and the path is not normalized. If PyConfig.executable is set explicitly, the path is left unchanged: PyConfig has the highest priority.
Should the executable path be normalized in this case?
--
I looked at Python 3.6 (the version before I started to rework the Python initialization). But there is no python_uwp.cpp in this version.
In Python 3.7, python_uwp.cpp calls set_process_name() which calls _Py_SetProgramFullPath(). But config_init_path_config() seems to ignore the _Py_SetProgramFullPath() call in Python 3.7.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38322>
_______________________________________
More information about the Python-bugs-list
mailing list