Serhiy Storchaka
680cb152c5
Issue #26032 : Optimized globbing in pathlib by using os.scandir(); it is now
about 1.5--4 times faster.
10 years ago
Brett Cannon
568be63248
Issue #27186 : Add os.PathLike support to pathlib.
This adds support both to pathlib.PurePath's constructor as well as
implementing __fspath__(). This removes the provisional status for
pathlib.
Initial patch by Dusty Phillips.
10 years ago
Martin Panter
e26da7c03a
Issue #27171 : Fix typos in documentation, comments, and test function names
10 years ago
Guido van Rossum
3d4d01f614
Back out 7e9605697dfc, 2e3c31ab586a, 759b2cecc289.
These added a path attribute to pathlib.Path objects, and docs.
Instead, we're going to use PEP 519.
(Starting in the 3.4 branch and merging forward from there since that's what I did originally.)
10 years ago
Berker Peksag
04d4229719
Issue #20589 : Invoking Path.owner() and Path.group() on Windows now raise
NotImplementedError instead of ImportError.
10 years ago
Berker Peksag
4a208e448e
Issue #23076 : Path.glob() now raises a ValueError if it's called with an
invalid pattern.
Patch by Thomas Nyberg.
10 years ago
Guido van Rossum
bc9fddaf50
Add another try/except PermissionError to avoid depending on listdir order. Fix issues #24120 and #26012 .
10 years ago
Guido van Rossum
e428231539
Issue #22570 : Add 'path' attribute to pathlib.Path objects.
10 years ago
Guido van Rossum
69bfb15bd8
Issue #26012 : Don't traverse into symlinks for ** pattern in pathlib.Path.[r]glob().
10 years ago
Guido van Rossum
6c2d33a258
Issue #24120 : Ignore PermissionError in pathlib.Path.[r]glob(). Ulrich Petri.
10 years ago
Berker Peksag
05492b8989
Issue #25417 : Remove the extra dot from docstring
10 years ago
Berker Peksag
267597f087
Issue #25417 : Fix typo in Path.samefile() docstring
Reported by Antony Lee.
10 years ago
Antoine Pitrou
57fffd6f99
Issue #23146 : Fix mishandling of absolute Windows paths with forward slashes in pathlib.
Detected and fixed by Serhiy.
11 years ago
Serhiy Storchaka
f4b7a02e93
Issue #21408 : The default __ne__() now returns NotImplemented if __eq__()
returned NotImplemented. Removed incorrect implementations of __ne__().
11 years ago
Antoine Pitrou
17cba7daf5
Issue #19777 : Provide a home() classmethod on Path objects.
Contributed by Victor Salgado and Mayank Tripathi.
11 years ago
Antoine Pitrou
5d4e27ecee
whitespace
11 years ago
Antoine Pitrou
8477ed6048
Issue #19776 : Add a expanduser() method on Path objects.
Patch by Serhiy.
11 years ago
Antoine Pitrou
db118f5db7
Close #22370 : Windows detection in pathlib is now more robust.
11 years ago
Antoine Pitrou
2b2852b1b4
Issue #22759 : Query methods on pathlib.Path() (exists(), is_dir(), etc.) now return False when the underlying stat call raises NotADirectoryError.
11 years ago
Georg Brandl
ea68398355
Closes #20218 : Added convenience methods read_text/write_text and read_bytes/
write_bytes to pathlib.Path objects.
Thanks to Christopher Welborn and Ram Rachum for original patches.
11 years ago
Barry Warsaw
7c549c4e64
- Issue #21539 : Add a *exists_ok* argument to `Pathlib.mkdir()` to mimic
`mkdir -p` and `os.makedirs()` functionality. When true, ignore
FileExistsErrors. Patch by Berker Peksag.
(With minor cleanups, additional tests, doc tweaks, etc. by Barry)
Also:
* Remove some unused imports in test_pathlib.py reported by pyflakes.
12 years ago
Antoine Pitrou
e50dafcd63
Issue #20639 : calling Path.with_suffix('') allows removing the suffix again.
Patch by July Tikhonov.
12 years ago
Antoine Pitrou
7084e736db
Issue #21714 : Disallow the construction of invalid paths using Path.with_name(). Original patch by Antony Lee.
12 years ago
Antoine Pitrou
43e3d9409d
Issue #19775 : Add a samefile() method to pathlib Path objects.
Initial patch by Vajrasky Kok.
12 years ago
Antoine Pitrou
cb5ec77d33
Issue #21127 : Path objects can now be instantiated from str subclass instances (such as numpy.str_).
Thanks to Antony Lee for the report and preliminary patch.
12 years ago
Antoine Pitrou
1b02da95d2
Issue #20111 : pathlib.Path.with_suffix() now sanity checks the given suffix.
12 years ago
Antoine Pitrou
156b3610b8
Issue #19918 : Fix PurePath.relative_to() under Windows.
12 years ago
Antoine Pitrou
0048c98fef
Issue #19921 : When Path.mkdir() is called with parents=True, any missing parent is created with the default permissions, ignoring the mode argument (mimicking the POSIX "mkdir -p" command).
Patch by Serhiy.
12 years ago
Antoine Pitrou
c274fd22ed
Issue #19887 : Improve the Path.resolve() algorithm to support certain symlink chains.
Original patch by Serhiy.
12 years ago
Serhiy Storchaka
a993902a28
Issue #19908 : pathlib now joins relative Windows paths correctly when a drive
is present. Original patch by Antoine Pitrou.
12 years ago
Antoine Pitrou
069a5e1057
Issue #19872 : remove unused imports in pathlib. Patch by Vajrasky Kok.
12 years ago
Antoine Pitrou
4a60d42aad
Issue #19852 : move Path._raw_open() around, as it is now a private method.
Patch by Vajrasky Kok.
12 years ago
Antoine Pitrou
2cf3917954
Issue #19715 : try the utime(..., None) approach again, now that it should be more precise under Windows
12 years ago
Antoine Pitrou
12820c0d5d
Revert utime(..., None) strategy (it has too poor resolution under Windows) and restore the previous test workaround
(issue #19715 )
12 years ago
Antoine Pitrou
c3055be5f3
Trying other strategy for #19715 : use utime(..., None)
12 years ago
Antoine Pitrou
0325a21da3
Fix whitespace
12 years ago
Antoine Pitrou
31119e4f10
Issue #19673 : Add pathlib to the stdlib as a provisional module (PEP 428).
12 years ago