[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-16 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5f239b0ba819 by Victor Stinner in branch 'default': Issue #13374: Deprecate os.getcwdb() on Windows http://hg.python.org/cpython/rev/5f239b0ba819 -- ___ Python tracker

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset afc716e463a1 by Victor Stinner in branch 'default': Issue #13374: Skip deprecation tests for os.symlink() on Windows XP http://hg.python.org/cpython/rev/afc716e463a1 -- ___ Python tracker

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-15 Thread Martin v . Löwis
Martin v. Löwis added the comment: > IIUC, it means that the library/application should not use the bytes API if > it intends to be supported on major platforms. I think you misunderstand; it does not literally mean that. Instead, it means that the library/application either must not use the b

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-15 Thread Florent Xicluna
Florent Xicluna added the comment: IIUC, it means that the library/application should not use the bytes API if it intends to be supported on major platforms. -- nosy: +flox ___ Python tracker

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset d42811b93357 by Victor Stinner in branch 'default': Issue #13374: The Windows bytes API has been deprecated in the os module. Use http://hg.python.org/cpython/rev/d42811b93357 -- ___ Python tracker

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-13 Thread STINNER Victor
STINNER Victor added the comment: > I notice that the patch changes rename() and link() to use > win32_decode_filename() to coerce the filename to unicode before using > the "wide" win32 api. Well, I did that to simplify the source code. > (Previously, rename() first tried the wide api, > fall

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-12 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Is this approach of coercing to unicode and only using the wide api > "blessed"? It's not. If people use byte strings, they specifically ask for what they get; Python shouldn't second-guess the data types. > I certainly think it should be. If so then one c

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-12 Thread sbt
sbt added the comment: I notice that the patch changes rename() and link() to use win32_decode_filename() to coerce the filename to unicode before using the "wide" win32 api. (Previously, rename() first tried the wide api, falling back to narrow if that failed; link() used wide if the args were

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-09 Thread Santoso Wijaya
Changes by Santoso Wijaya : -- nosy: +santa4nt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-09 Thread STINNER Victor
STINNER Victor added the comment: deprecate_win_bytes_api-2.patch: * test_os.py: catch_warning() should be moved into test_link_bytes() * the change on Py_GetFinalPathNameByHandleA may be done in another commit -- ___ Python tracker

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-09 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Probably os.execv() should be implemented on Windows with _wexecv() > instead of _execv(). Likewise for other functions which have "wide" > versions. Or maybe it wouldn't be worth the effort, since it would > mean writing separate Windows implementations.

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-09 Thread STINNER Victor
STINNER Victor added the comment: Updated patch: * os.rename(), os.symlink(), os.link() accept (bytes, str) and (str, bytes) again * ensure that the warning is emited after parsing arguments, not before (to not emit a warning if an int is passed instead of bytes or str) * add a test on os.

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-09 Thread STINNER Victor
STINNER Victor added the comment: > Probably os.execv() should be implemented on Windows with _wexecv() instead > of _execv(). That's a different story. Would you like to implement it? If yes, please open a new issue. > I don't know what you mean about os.readlink() though: the Windows > imp

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-09 Thread sbt
sbt added the comment: > Functions like os.execv() or os.readlink() are not deprecated because > the underlying C function really uses a bytes API (execv and readlink). Probably os.execv() should be implemented on Windows with _wexecv() instead of _execv(). Likewise for other functions which

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-08 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +loewis, mhammond ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-08 Thread STINNER Victor
STINNER Victor added the comment: Functions like os.execv() or os.readlink() are not deprecated because the underlying C function really uses a bytes API (execv and readlink). -- ___ Python tracker __

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-08 Thread STINNER Victor
STINNER Victor added the comment: The patch deprecates bytes filenames for the following functions: nt._getfullpathname nt._isdir os.access os.chdir os.chmod os.link os.listdir os.lstat os.mkdir os.open os.rename os.rmdir os.stat os.symlink os.unlink os.utime Oh, I forgot a test for os.open(by

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6bf07db23445 by Victor Stinner in branch 'default': Issue #13374: Use Unicode filenames instead of bytes filenames http://hg.python.org/cpython/rev/6bf07db23445 -- nosy: +python-dev ___ Python tracker <

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-08 Thread STINNER Victor
New submission from STINNER Victor : Attached patch deprecates the Windows ANSI API (bytes API) in the nt module. Use Unicode filenames instead of bytes filenames to not depend on the ANSI code page anymore and to support any Unicode filename. The patch changes also os.link(), os.rename() and