Commit Graph

58 Commits

Author SHA1 Message Date
Florent Xicluna 3522e04071 Merged revisions 79195,79425,79427,79450 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79195 | florent.xicluna | 2010-03-21 13:27:20 +0100 (dim, 21 mar 2010) | 2 lines

  Issue #8179: Fix macpath.realpath() on a non-existing path.
........
  r79425 | florent.xicluna | 2010-03-25 21:32:07 +0100 (jeu, 25 mar 2010) | 2 lines

  Syntax cleanup `== None` -> `is None`
........
  r79427 | florent.xicluna | 2010-03-25 21:39:10 +0100 (jeu, 25 mar 2010) | 2 lines

  Fix test_unittest and test_warnings when running "python -Werror -m test.regrtest"
........
  r79450 | florent.xicluna | 2010-03-26 20:32:44 +0100 (ven, 26 mar 2010) | 2 lines

  Ensure that the failed or unexpected tests are sorted before printing.
........
2010-03-28 09:37:55 +00:00
Ezio Melotti 502f8eb50b Merged revisions 78247 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78247 | ezio.melotti | 2010-02-20 10:09:39 +0200 (Sat, 20 Feb 2010) | 1 line

  #3426: os.path.abspath now returns unicode when its arg is unicode.
........
2010-02-20 09:16:04 +00:00
Philip Jenvey 54cea3b1a5 Merged revisions 72458 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72458 | philip.jenvey | 2009-05-07 19:28:39 -0700 (Thu, 07 May 2009) | 2 lines

  #4351: more appropriate DeprecationWarning stacklevels
........
2009-05-08 02:47:02 +00:00
Benjamin Peterson 0893a0a961 Add Py3k warnings to os.path.walk 2008-05-09 00:27:01 +00:00
Martin v. Löwis 05c075d629 Bug #1115886: os.path.splitext('.cshrc') gives now ('.cshrc', ''). 2007-03-07 11:04:33 +00:00
Jack Diederich 7b60464ceb - Move functions common to all path modules into genericpath.py and have the
OS speicifc path modules import them.
- Have os2emxpath import common functions fron ntpath instead of using copies
2006-08-26 18:42:06 +00:00
Georg Brandl f0de6a18bb Bug #1266283: lexists() is not exported from os.path 2005-08-22 18:02:59 +00:00
Georg Brandl 649f8e7de2 patch [ 1105730 ] Faster commonprefix in macpath, ntpath, etc. 2005-08-03 07:30:12 +00:00
Johannes Gijsbers d2a1aa4b1e Whitespace normalization. 2004-08-30 13:39:50 +00:00
Johannes Gijsbers ae882f7984 Patch #941486: add os.path.lexists(). Also fix bug #940578 by using lexists in glob.glob. 2004-08-30 10:19:56 +00:00
Martin v. Löwis bdec50f027 Feature request #935915: Add os.path.devnull. 2004-06-08 08:29:33 +00:00
Jack Jansen 98fc683719 Getting rid of macfs. 2003-02-27 23:18:46 +00:00
Skip Montanaro 117910dc44 Migrate definitions of several platform-dependent path-related variables
into the relevant path modules.  See patch #686397.
2003-02-14 19:35:31 +00:00
Tim Peters 2c60f7a136 Whitespace normalization. 2003-01-29 03:49:43 +00:00
Jack Jansen 791f7d4783 Added ismount().
Fixes #661762, bugfix candidate.
2003-01-15 22:45:48 +00:00
Neal Norwitz 61cdac6d3d 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?
2003-01-03 18:01:57 +00:00
Martin v. Löwis 96a60e4af5 Patch #658927: Add getctime to os.path.
Document that getatime and getmtime may return floats.
2002-12-31 13:11:54 +00:00
Martin v. Löwis de3337913f Patch #536661: Improve performance of splitext. Add test_macpath. 2002-12-12 20:30:20 +00:00
Mark Hammond 8696ebcd28 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.
2002-10-08 02:44:31 +00:00
Raymond Hettinger 32200aeac6 Replaced obsolete stat module constants with equivalent attributes 2002-06-01 19:51:15 +00:00
Tim Peters 8ac1495a6a Whitespace normalization. 2002-05-23 15:15:30 +00:00
Anthony Baxter ae7639dbfb whitespace fixup. test__all__ and test_sundry were failing
for me on linux because of the inconsistent whitespace.
2002-04-23 02:38:39 +00:00
Jack Jansen 992d58b770 Fixes based on ideas from Christopher Smith:
- islink() now returns true for alias files
- walk() no longer follows aliases while traversing
- realpath() implemented, returning an alias-free pathname.

As this could conceivably break existing code I think it isn't a bugfix candidate.
2002-04-22 13:55:43 +00:00
Guido van Rossum 8ca162f417 Partial introduction of bools where appropriate. 2002-04-07 06:36:23 +00:00
Tim Peters bc0e910826 Convert a pile of obvious "yes/no" functions to return bool. 2002-04-04 22:55:58 +00:00
Neal Norwitz 93cf79fde4 Use docstrings for exception classes 2002-03-31 14:06:41 +00:00
Neal Norwitz 27a353020b Stop using string exceptions 2002-03-31 13:58:20 +00:00
Tim Peters cf5e6a4a5d SF bug [#469732] os.path.walk docstring inconsistent.
We have 5 implementations of walk(), and 5 different docstrings.  Combined
'em.  Let's see how long it takes before they're all different again!
2001-10-10 04:16:20 +00:00
Guido van Rossum 83eeef4b06 SF patch #461781 by Chris Lawrence: os.path.realpath - Resolve symlinks:
Once upon a time, I put together a little function
   that tries to find the canonical filename for a given
   pathname on POSIX. I've finally gotten around to
   turning it into a proper patch with documentation.
   On non-POSIX, I made it an alias for 'abspath', as
   that's the behavior on POSIX when no symlinks are
   encountered in the path.

   Example:
   >>> os.path.realpath('/usr/bin/X11/X')
   '/usr/X11R6/bin/X'
2001-09-17 15:16:09 +00:00
Greg Ward 034cbf1350 Typo fix (spelling mistake in error message). 2001-08-08 20:55:10 +00:00
Skip Montanaro 17ab123cf1 a few more modules get __all__ 2001-01-24 06:27:27 +00:00
Fred Drake 8152d32375 Update the code to better reflect recommended style:
Use != instead of <> since <> is documented as "obsolescent".
Use "is" and "is not" when comparing with None or type objects.
2000-12-12 23:20:45 +00:00
Fred Drake b4e460ac4b Avoid import of string module; it is only needed for expandvars().
Never assume that os.sep is for the module-specific platform; use the
right separator character directly.
Fix some minor style consistency nits.
2000-09-28 16:25:20 +00:00
Jack Jansen 03c06ee7fc Restored commonprefix() semantics. 2000-08-23 09:13:40 +00:00
Jack Jansen 2fc0109375 Rewrite of normpath() by Corran Webster, so trailing :s are removed
(except for : and volume:, where they are needed).
2000-08-06 21:18:35 +00:00
Skip Montanaro 97bc98aea7 fixed semantics of commonprefix to work by path elements instead of
characters.
2000-07-12 16:55:57 +00:00
Guido van Rossum 46d565111e getatime() returned the mtime instead of the atime.
Similar to an old bug in ntpath.py.
2000-07-01 10:52:49 +00:00
Guido van Rossum 54f22ed30b More trivial comment -> docstring transformations by Ka-Ping Yee,
who writes:

Here is batch 2, as a big collection of CVS context diffs.
Along with moving comments into docstrings, i've added a
couple of missing docstrings and attempted to make sure more
module docstrings begin with a one-line summary.

I did not add docstrings to the methods in profile.py for
fear of upsetting any careful optimizations there, though
i did move class documentation into class docstrings.

The convention i'm using is to leave credits/version/copyright
type of stuff in # comments, and move the rest of the descriptive
stuff about module usage into module docstrings.  Hope this is
okay.
2000-02-04 15:10:34 +00:00
Fred Drake 69f87c580d getsize(), getatime(), getmtime():
Constants from stat module were imported using "import *";
	don't access them via stat.ST_*!

	Reported by that other vR.  ;-)
1999-07-23 15:04:05 +00:00
Guido van Rossum e294cf620a Add abspath() 1999-01-29 18:05:18 +00:00
Guido van Rossum 2bc1f8f07e Added getsize(), getmtime(), getatime() 1998-07-24 20:49:26 +00:00
Guido van Rossum 5c1d2297ea Instead of 'import mac', use 'import os' -- this way, the path syntax
manipulation routines can be used on non-Mac platforms (e.g. to
manipulate pathnames in a Mac specific archive).
1998-03-03 21:49:01 +00:00
Guido van Rossum d6a111e2dd Fix for boundary case (Jack) 1997-05-21 14:59:17 +00:00
Barry Warsaw 19302de7a0 join(): Wax the incorrect leading comment 1997-02-18 22:06:21 +00:00
Barry Warsaw 384d249006 join(): join one or more path components 1997-02-18 21:53:25 +00:00
Guido van Rossum a48bf79977 Added splitext() 1996-07-23 02:28:32 +00:00
Jack Jansen f4e7d2a396 Added (dummy) expanduser and expandvar methods 1995-12-15 13:23:37 +00:00
Guido van Rossum 0ec3126222 added normpath() and splitdrive() 1995-08-10 18:09:16 +00:00
Jack Jansen a68bfe29ec Added missing walk() function 1995-08-07 14:09:27 +00:00
Guido van Rossum 7e4b2def34 changes for the Mac 1995-01-27 02:41:45 +00:00