[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
Roundup Robot added the comment: New changeset ee7b713fec71 by Victor Stinner in branch 'default': Issue #15478: os.lchflags() is not always available when os.chflags() is available http://hg.python.org/cpython/rev/ee7b713fec71 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
Roundup Robot added the comment: New changeset 817a90752470 by Victor Stinner in branch 'default': Issue #15478: Oops, fix regression in os.open() on Windows http://hg.python.org/cpython/rev/817a90752470 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
Roundup Robot added the comment: New changeset 11ea4eb79e9d by Victor Stinner in branch 'default': Issue #15478: Fix test_pep277 on Windows http://hg.python.org/cpython/rev/11ea4eb79e9d -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
Stefan Krah added the comment: One of 13ebaa36d87d, 9f696742dbda or 6903f5214e99 causes test failures in test_pep277: == FAIL: test_failures (test.test_pep277.UnicodeFileTests) -- Traceback (most recent call last): File C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_pep277.py, line 120, in test_failures self._apply_failure(os.listdir, name) File C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_pep277.py, line 105, in _apply_failure self.assertEqual(wildcard, '*.*') AssertionError: '7_\u05d4\u05e9\u05e7\u05e6\u05e5\u05e1' != '*.*' - 7_\u05d4\u05e9\u05e7\u05e6\u05e5\u05e1 + *.* -- nosy: +skrah resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
Stefan Krah added the comment: Additionally, some of the changes cause a failure in test_subprocess: == ERROR: test_no_leaking (test.test_subprocess.ProcessTestCase) -- Traceback (most recent call last): File C:\Users\stefan\pydev\cpython\lib\test\test_subprocess.py, line 823, in test_no_leaking handles.append(os.open(tmpfile, os.O_WRONLY|os.O_CREAT)) FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'c:\\users\\stefan\\appdata\\l ocal\\temp\\tmpa41o4x\\@test_2236_tmp' -- -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
Roundup Robot added the comment: New changeset 13ebaa36d87d by Victor Stinner in branch 'default': Issue #15478: Use path_error() in more posix functions, especially in Windows http://hg.python.org/cpython/rev/13ebaa36d87d New changeset 9f696742dbda by Victor Stinner in branch 'default': Issue #15478: Fix again to fix test_os on Windows http://hg.python.org/cpython/rev/9f696742dbda -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
Roundup Robot added the comment: New changeset 6903f5214e99 by Victor Stinner in branch 'default': Issue #15478: Use source filename in OSError, not destination filename http://hg.python.org/cpython/rev/6903f5214e99 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
STINNER Victor added the comment: All issues should now be fixed. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
Roundup Robot added the comment: New changeset b3434c1ae503 by Victor Stinner in branch 'default': Issue #15441, #15478: Reenable test_nonascii_abspath() on Windows http://hg.python.org/cpython/rev/b3434c1ae503 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
Serhiy Storchaka added the comment: See also issue16074. The patch changes also os.link(), os.rename() and os.replace() to use the source, not the destination, in the error message. It is maybe a mistake because these functions can also fail in the directory of the destination does not exist. Yes, in different cases it can be the source, the destination, both, unknown or none of them. -- nosy: +serhiy.storchaka type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
Roundup Robot added the comment: New changeset 01cc9fb52887 by Victor Stinner in branch 'default': Issue #15478: Fix test_os on Windows (os.chown is missing) http://hg.python.org/cpython/rev/01cc9fb52887 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
Roundup Robot added the comment: New changeset ef87bd0797de by Victor Stinner in branch 'default': Issue #15478: Fix test_os on FreeBSD http://hg.python.org/cpython/rev/ef87bd0797de -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
Roundup Robot added the comment: New changeset 67d69f943b7f by Victor Stinner in branch 'default': Issue #15478: Raising an OSError doesn't decode or encode the filename anymore http://hg.python.org/cpython/rev/67d69f943b7f -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
Roundup Robot added the comment: New changeset 27a3b19ee792 by Victor Stinner in branch 'default': Issue #15478: Fix compilation on Windows http://hg.python.org/cpython/rev/27a3b19ee792 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
STINNER Victor added the comment: The commit is incomplete, there are some remaining functions that need to be patched: here is a new (untested) patch for more Windows functions. -- Added file: http://bugs.python.org/file27789/oserror_filename_windows.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
STINNER Victor added the comment: Attached patch modifies all functions of the os module taking filenames to keep the filename unmodified in OSError.filename. The patch changes also os.link(), os.rename() and os.replace() to use the source, not the destination, in the error message. It is maybe a mistake because these functions can also fail in the directory of the destination does not exist. -- keywords: +patch Added file: http://bugs.python.org/file26675/oserror_filename.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
Atsuo Ishimoto added the comment: +1 for keeping the file name unchanged. This solution is not very compatible with prior versions, but simple and least-surprise. I prefer other platforms than Windows to use same method to build OSError. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
Changes by STINNER Victor victor.stin...@gmail.com: -- title: UnicodeDecodeError on OSError - UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
STINNER Victor victor.stin...@gmail.com added the comment: In Python 2, it looks like open(arg) does pass its filename argument unchanged to OSError constructor (so it can be bytes or unicode). OSError.filename is always bytes for os.chdir() on UNIX, but OSError.filename can be bytes or unicode for os.chdir() on Windows. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com