[Python-checkins] python/dist/src/Misc NEWS,1.686,1.687

jvr@users.sourceforge.net jvr@users.sourceforge.net
2003年3月03日 09:32:22 -0800


Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1:/tmp/cvs-serv13097/Misc
Modified Files:
	NEWS 
Log Message:
Patch #683592 revisited, after discussions with MvL:
- Implement the behavior as specified in PEP 277, meaning os.listdir()
 will only return unicode strings if it is _called_ with a unicode
 argument.
- And then return only unicode, don't attempt to convert to ASCII.
- Don't switch on Py_FileSystemDefaultEncoding, but simply use the
 default encoding if Py_FileSystemDefaultEncoding is NULL. This means
 os.listdir() can now raise UnicodeDecodeError if the default encoding
 can't represent the directory entry. (This seems better than silcencing
 the error and fall back to a byte string.)
- Attempted to decribe the above in Doc/lib/libos.tex.
- Reworded the Misc/NEWS items to reflect the current situation.
This checkin also fixes bug #696261, which was due to os.listdir() not
using Py_FileSystemDefaultEncoding, like all file system calls are
supposed to.
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.686
retrieving revision 1.687
diff -C2 -d -r1.686 -r1.687
*** NEWS	3 Mar 2003 12:29:41 -0000	1.686
--- NEWS	3 Mar 2003 17:32:15 -0000	1.687
***************
*** 42,50 ****
 report <http://www.python.org/sf/693121>.
 
! - os.listdir() now returns Unicode strings on platforms that set
! Py_FileSystemDefaultEncoding, for file names that are not representable
! in ASCII. (This currently only affects MacOS X; on Windows versions
! with wide file name support os.listdir() already returned Unicode
! strings.)
 
 - Distutils: both 'py_modules' and 'packages' keywords can now be specified
--- 42,48 ----
 report <http://www.python.org/sf/693121>.
 
! - On Unix platforms, if os.listdir() is called with a Unicode argument,
! it now returns Unicode strings. (This behavior was added earlier
! to the Windows NT/2k/XP version of os.listdir().)
 
 - Distutils: both 'py_modules' and 'packages' keywords can now be specified
***************
*** 89,94 ****
 ---
 
! - os.listdir() now may return Unicode strings on MacOS X. See the general
! news item under "Library".
 
 - A new method MacOS.WMAvailable() returns true if it is safe to access
--- 87,92 ----
 ---
 
! - os.listdir() now returns Unicode strings on MacOS X when called with
! a Unicode argument. See the general news item under "Library".
 
 - A new method MacOS.WMAvailable() returns true if it is safe to access

AltStyle によって変換されたページ (->オリジナル) /