You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It does not work with non-ASCII names in non-UTF-8 locale. All related test_sys tests are failed on in non-UTF-8 locale. For example:
$ LC_ALL=uk_UA ./python -m test -vuall test_sys -m test_remote_exec
======================================================================
ERROR: test_remote_exec (test.test_sys.TestRemoteExec.test_remote_exec)
Test basic remote exec functionality
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/serhiy/py/cpython/Lib/test/test_sys.py", line 2078, in test_remote_exec
returncode, stdout, stderr = self._run_remote_exec_test(script)
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/home/serhiy/py/cpython/Lib/test/test_sys.py", line 2052, in _run_remote_exec_test
sys.remote_exec(proc.pid, script_path)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: Script file does not exist
----------------------------------------------------------------------
Even in UTF-8 locale it fails if the path contains non-UTF-8 bytes.
The issue is twofold. On one side, sys.remote_exec() encodes the path to UTF-8 (even if the bytes path was decoded using the filesystem encoding). It fails because os.access() can't find file using the wrong path. It can accidentally success if other file exists with such path. On other side, PyFile_OpenFile() which interprets the path as UTF-8 is used to open the file.
…133887)
It now supports non-ASCII paths in non-UTF-8 locales and
non-UTF-8 paths in UTF-8 locales.
(cherry picked from commit c09cec5)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
… (GH-133963)
It now supports non-ASCII paths in non-UTF-8 locales and
non-UTF-8 paths in UTF-8 locales.
(cherry picked from commit c09cec5)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
Bug report
There are two symptoms:
test_sys
tests are failed on in non-UTF-8 locale. For example:The issue is twofold. On one side,
sys.remote_exec()
encodes the path to UTF-8 (even if the bytes path was decoded using the filesystem encoding). It fails becauseos.access()
can't find file using the wrong path. It can accidentally success if other file exists with such path. On other side,PyFile_OpenFile()
which interprets the path as UTF-8 is used to open the file.Linked PRs
The text was updated successfully, but these errors were encountered: