[Python-checkins] python/dist/src/Lib macpath.py,1.42,1.43 ntpath.py,1.53,1.54 os2emxpath.py,1.8,1.9 posixpath.py,1.56,1.57
nnorwitz@users.sourceforge.net
nnorwitz@users.sourceforge.net
Fri, 03 Jan 2003 10:02:01 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv5625/Lib
Modified Files:
macpath.py ntpath.py os2emxpath.py posixpath.py
Log Message:
Fix SF #659228, 'realpath' function missing from os.path
Also added realpath = abspath for os2emx, similar to windows/mac
which also don't really implement realpath.
Backport candidate, I think?
Index: macpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/macpath.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** macpath.py 31 Dec 2002 13:11:53 -0000 1.42
--- macpath.py 3 Jan 2003 18:01:55 -0000 1.43
***************
*** 8,12 ****
"getatime","getctime", "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.
--- 8,12 ----
"getatime","getctime", "islink","exists","isdir","isfile",
"walk","expanduser","expandvars","normpath","abspath",
! "realpath","supports_unicode_filenames"]
# Normalize the case of a pathname. Dummy in Posix, but <s>.lower() here.
Index: ntpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ntpath.py,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** ntpath.py 31 Dec 2002 13:11:53 -0000 1.53
--- ntpath.py 3 Jan 2003 18:01:56 -0000 1.54
***************
*** 14,18 ****
"getatime","getctime", "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.
--- 14,18 ----
"getatime","getctime", "islink","exists","isdir","isfile","ismount",
"walk","expanduser","expandvars","normpath","abspath","splitunc",
! "realpath","supports_unicode_filenames"]
# Normalize the case of a pathname and map slashes to backslashes.
Index: os2emxpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/os2emxpath.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** os2emxpath.py 31 Dec 2002 13:11:54 -0000 1.8
--- os2emxpath.py 3 Jan 2003 18:01:57 -0000 1.9
***************
*** 13,17 ****
"getatime","getctime", "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.
--- 13,17 ----
"getatime","getctime", "islink","exists","isdir","isfile","ismount",
"walk","expanduser","expandvars","normpath","abspath","splitunc",
! "realpath","supports_unicode_filenames"]
# Normalize the case of a pathname and map slashes to backslashes.
***************
*** 405,408 ****
--- 405,411 ----
path = join(os.getcwd(), path)
return normpath(path)
+
+ # realpath is a no-op on systems without islink support
+ realpath = abspath
supports_unicode_filenames = False
Index: posixpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/posixpath.py,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** posixpath.py 31 Dec 2002 13:11:54 -0000 1.56
--- posixpath.py 3 Jan 2003 18:01:57 -0000 1.57
***************
*** 18,22 ****
"getatime","getctime","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.
--- 18,23 ----
"getatime","getctime","islink","exists","isdir","isfile","ismount",
"walk","expanduser","expandvars","normpath","abspath",
! "samefile","sameopenfile","samestat",
! "realpath","supports_unicode_filenames"]
# Normalize the case of a pathname. Trivial in Posix, string.lower on Mac.