[Python-checkins] python/dist/src/Lib dospath.py,1.29,1.30 macpath.py,1.39,1.40 ntpath.py,1.49,1.50 os2emxpath.py,1.6,1.7 posixpath.py,1.52,1.53

mhammond@users.sourceforge.net mhammond@users.sourceforge.net
2002年10月07日 19:44:32 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv11411/Lib
Modified Files:
	dospath.py macpath.py ntpath.py os2emxpath.py posixpath.py 
Log Message:
Add os.path.supports_unicode_filenames for all platforms, 
sys.getwindowsversion() on Windows (new enahanced Tim-proof <wink> 
version), and fix test_pep277.py in a few minor ways.
Including doc and NEWS entries.
Index: dospath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/dospath.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** dospath.py	1 Jun 2002 19:51:15 -0000	1.29
--- dospath.py	8 Oct 2002 02:44:29 -0000	1.30
***************
*** 7,11 ****
 "basename","dirname","commonprefix","getsize","getmtime",
 "getatime","islink","exists","isdir","isfile","ismount",
! "walk","expanduser","expandvars","normpath","abspath"]
 
 def normcase(s):
--- 7,12 ----
 "basename","dirname","commonprefix","getsize","getmtime",
 "getatime","islink","exists","isdir","isfile","ismount",
! "walk","expanduser","expandvars","normpath","abspath",
! "supports_unicode_filenames"]
 
 def normcase(s):
***************
*** 337,338 ****
--- 338,340 ----
 # realpath is a no-op on systems without islink support
 realpath = abspath
+ supports_unicode_filenames = False
Index: macpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/macpath.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** macpath.py	1 Jun 2002 19:51:15 -0000	1.39
--- macpath.py	8 Oct 2002 02:44:30 -0000	1.40
***************
*** 7,11 ****
 "basename","dirname","commonprefix","getsize","getmtime",
 "getatime","islink","exists","isdir","isfile",
! "walk","expanduser","expandvars","normpath","abspath"]
 
 # Normalize the case of a pathname. Dummy in Posix, but <s>.lower() here.
--- 7,12 ----
 "basename","dirname","commonprefix","getsize","getmtime",
 "getatime","islink","exists","isdir","isfile",
! "walk","expanduser","expandvars","normpath","abspath",
! "supports_unicode_filenames"]
 
 # Normalize the case of a pathname. Dummy in Posix, but <s>.lower() here.
***************
*** 249,250 ****
--- 250,253 ----
 path = macfs.ResolveAliasFile(path)[0].as_pathname()
 return path
+ 
+ supports_unicode_filenames = False
Index: ntpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ntpath.py,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** ntpath.py	1 Jun 2002 19:51:15 -0000	1.49
--- ntpath.py	8 Oct 2002 02:44:30 -0000	1.50
***************
*** 8,16 ****
 import os
 import stat
 
 __all__ = ["normcase","isabs","join","splitdrive","split","splitext",
 "basename","dirname","commonprefix","getsize","getmtime",
 "getatime","islink","exists","isdir","isfile","ismount",
! "walk","expanduser","expandvars","normpath","abspath","splitunc"]
 
 # Normalize the case of a pathname and map slashes to backslashes.
--- 8,18 ----
 import os
 import stat
+ import sys
 
 __all__ = ["normcase","isabs","join","splitdrive","split","splitext",
 "basename","dirname","commonprefix","getsize","getmtime",
 "getatime","islink","exists","isdir","isfile","ismount",
! "walk","expanduser","expandvars","normpath","abspath","splitunc",
! "supports_unicode_filenames"]
 
 # Normalize the case of a pathname and map slashes to backslashes.
***************
*** 477,478 ****
--- 479,482 ----
 # realpath is a no-op on systems without islink support
 realpath = abspath
+ # Win9x family and earlier have no Unicode filename support.
+ supports_unicode_filenames = sys.getwindowsversion()[3] >= 2
Index: os2emxpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/os2emxpath.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** os2emxpath.py	1 Jun 2002 19:51:15 -0000	1.6
--- os2emxpath.py	8 Oct 2002 02:44:30 -0000	1.7
***************
*** 12,16 ****
 "basename","dirname","commonprefix","getsize","getmtime",
 "getatime","islink","exists","isdir","isfile","ismount",
! "walk","expanduser","expandvars","normpath","abspath","splitunc"]
 
 # Normalize the case of a pathname and map slashes to backslashes.
--- 12,17 ----
 "basename","dirname","commonprefix","getsize","getmtime",
 "getatime","islink","exists","isdir","isfile","ismount",
! "walk","expanduser","expandvars","normpath","abspath","splitunc",
! "supports_unicode_filenames"]
 
 # Normalize the case of a pathname and map slashes to backslashes.
***************
*** 401,402 ****
--- 402,405 ----
 path = join(os.getcwd(), path)
 return normpath(path)
+ 
+ supports_unicode_filenames = False
Index: posixpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/posixpath.py,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** posixpath.py	5 Sep 2002 21:08:25 -0000	1.52
--- posixpath.py	8 Oct 2002 02:44:30 -0000	1.53
***************
*** 18,22 ****
 "getatime","islink","exists","isdir","isfile","ismount",
 "walk","expanduser","expandvars","normpath","abspath",
! "samefile","sameopenfile","samestat"]
 
 # Normalize the case of a pathname. Trivial in Posix, string.lower on Mac.
--- 18,22 ----
 "getatime","islink","exists","isdir","isfile","ismount",
 "walk","expanduser","expandvars","normpath","abspath",
! "samefile","sameopenfile","samestat","supports_unicode_filenames"]
 
 # Normalize the case of a pathname. Trivial in Posix, string.lower on Mac.
***************
*** 410,411 ****
--- 410,414 ----
 
 return filename
+ 
+ supports_unicode_filenames = False
+ 

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