| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Python 2.4 changed ntpath.abspath to do an import
inside the function. As a result, due to Python's
import lock, anything calling abspath on Windows
(directly, or indirectly like tempfile.TemporaryFile)
hung when it was called from a thread spawned as a
side effect of importing a module.
This is a depressingly frequent problem, and
deserves a more general fix. I'm settling for
a micro-fix here because this specific one accounts
for a report of Zope Corp's ZEO hanging on Windows,
and it was an odd way to change abspath to begin
with (ntpath needs a different implementation
depending on whether we're actually running on
Windows, and the _obvious_ way to arrange for that
is not to bury a possibly-failing import _inside_
the function).
Note that if/when other micro-fixes of this kind
get made, the new Lib/test/threaded_import_hangers.py
is a convenient place to add tests for them.
|
| |
|
| |
|
|
|
|
| |
in glob.glob.
|
|
|
|
|
|
| |
path. Also clarifies UNC handling and adds appropriate tests.
Applies patch #988607 to fix bug #980327. Thanks Paul Moore.
|
| |
|
|
|
|
| |
(From SF patch #810751)
|
|
|
|
| |
backport candidate
|
|
|
|
|
|
| |
- 'os2' references in ntpath.py relate to the VACPP port, not the EMX port;
- the VACPP port uses the same defpath as all other ntpath.py supported
platforms except 'ce'.
|
|
|
|
| |
into the relevant path modules. See patch #686397.
|
|
|
|
|
|
|
| |
Also added realpath = abspath for os2emx, similar to windows/mac
which also don't really implement realpath.
Backport candidate, I think?
|
|
|
|
| |
Document that getatime and getmtime may return floats.
|
| |
|
|
|
|
|
|
| |
imported on systems other than Windows, and in particular is imported
by test___all__; the compile farm reported that all Linux tests failed
due to this; isn't anyone in PythonDevLand running CVS on Linux?!).
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
imported.
|
|
|
|
|
|
| |
ntpath.join('a', '') was producing 'a' instead of 'a\\' as in 2.1.
Impossible to guess what was ever *intended*, but since split('a\\')
produces ('a', ''), I think it's best if join('a', '') gives 'a\\' back.
|
|
|
|
|
| |
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!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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'
|
|
|
|
|
|
| |
I actually rewrote normpath quite a bit: it had no test cases, and as
soon as I starting writing some I found several cases that didn't make
sense.
|
|
|
|
| |
special cases. test_pkg works again on Windows.
|
|
|
|
|
|
|
| |
d:/whatever instead of /whatever. While I'm afraid changing isabs()
to be *consistent* with this would break lots of code, it makes
best sense for join() to do it this way. Thanks to Alex Martelli for
pushing back on this one!
|
| |
|
|
|
|
|
|
|
| |
This is a Windows-specific glitch that's really due to that, e.g.,
ntpath.join("c:", "/abc") returned "/abc" instead of "c:/abc". Made
join smarter.
Bugfix candidate.
|
| |
|
|
|
|
| |
dealing with the file system. As discussed on python-dev and in patch 410465.
|
| |
|
| |
|
|
|
|
|
| |
Use != instead of <> since <> is documented as "obsolescent".
Use "is" and "is not" when comparing with None or type objects.
|
|
|
|
|
|
| |
Never assume that os.sep is for the module-specific platform; use the
right separator character directly.
Fix some minor style consistency nits.
|
|
|
|
| |
"a:b", not "a:/b". Similar change was made to posixmodule.c earlier.
|
| |
|
|
|
|
| |
Windows, if an empty path is specified. It previously did not if an empty path was delegated to win32api.GetFullPathName())
|
|
|
|
| |
* case insensitive comparison
|
| |
|
|
|
|
| |
characters.
|
|
|
|
|
| |
getatime() returned the mtime instead of the atime.
Similar to an old bug in posixpath.py.
|
| |
|
|
|
|
| |
imported; in that case, abspath is replaced by a fallback version.
|
|
|
|
|
| |
(and even when it fails). This avoids the problem where a trailing
separator is not removed when win32api.GetFullPathName() is used.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
splitunc() parses UNC paths. The contributor of the UNC parsing in
splitdrive() doesn't like it, but I haven't heard a good reason to
keep it, and it causes some problems. (I think there's a
philosophical problem -- to me, the split*() functions are purely
syntactical, and the fact that \\foo is not a valid path doesn't mean
that it shouldn't be considered an absolute path.)
Also (quite separately, but strangely related to the philosophical
issue above) fix abspath() so that if win32api exists, it doesn't fail
when the path doesn't actually exist -- if GetFullPathName() fails,
fall back on the old strategy (join with getcwd() if neccessary, and
then use normpath()).
|
| |
|
|
|
|
|
|
| |
\\host\mountpoint\dir\file). By Larry Hastings.
Also cleaned up some docstrings.
|
| |
|
| |
|