summaryrefslogtreecommitdiffstats
path: root/Lib/pathlib.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-38422: Clarify docstrings of pathlib suffix(es) (GH-16679)Miss Skeleton (bot)2019-11-021-2/+10
| | | | | | | | | | Whenever I use `path.suffix` I have to check again whether it includes the dot or not. I decided to add it to the docstring so I won't have to keep checking. https://bugs.python.org/issue38422 Automerge-Triggered-By: @pitrou (cherry picked from commit 8d4fef4ee2a318097f429cf6cbd4fb2e430bb9da) Co-authored-by: Ram Rachum <ram@rachum.com>
* bpo-31202: Preserve case of literal parts in Path.glob() on Windows. (GH-16860)Miss Skeleton (bot)2019-10-211-18/+20
| | | | | (cherry picked from commit 10ecbadb799ddf3393d1fc80119a3db14724d381) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.7] bpo-36035: fix Path.rglob for broken links (GH-11988) (GH-13469)Miss Islington (bot)2019-05-211-3/+10
| | | | | | | | | | Links creating an infinite symlink loop would raise an exception. (cherry picked from commit d5c120f7eb6f2a9cdab282a5d588afed307a23df) Co-authored-by: Jörg Stucke <joerg.stucke@fkie.fraunhofer.de> https://bugs.python.org/issue36035
* [3.7] bpo-36766: Typos in docs and code comments (GH-13116). (GH-13136)penguindustin2019-05-061-1/+1
| | | | | | | | | | | (cherry picked from commit 964663089547ca110199e23867b46b07ff4be88c) Co-authored-by: penguindustin <penguindustin@gmail.com> https://bugs.python.org/issue36766
* [3.7] bpo-22062: Updated docstring and documentation for pathlib (GH-8519) ↵Miss Islington (bot)2019-02-111-2/+3
| | | | | | | | | | | | | | | (GH-11817) Original patch by Mike Short https://bugs.python.org/issue22062 (cherry picked from commit 537b6caa565ec2fc304ba6f4400cd347ce2af64b) Co-authored-by: Eivind Teig <eivind.teig@gmail.com> https://bugs.python.org/issue22062
* bpo-35692: pathlib no longer raises when checking file and directory ↵Miss Islington (bot)2019-02-041-9/+18
| | | | | | | existence on drives that are not ready (GH-11746) (cherry picked from commit 2f6fae6e510dba653391cb510a2aca8322eec03b) Co-authored-by: Steve Dower <steve.dower@microsoft.com>
* bpo-33635: Handling Bad file descriptor in Path.is_file and related. (GH-8542)Miss Islington (bot)2018-08-271-10/+19
| | | | | (cherry picked from commit 216b745eafa7cd4a683a8405dcfbd7f5567f504c) Co-authored-by: Przemysław Spodymek <przemyslaw@spodymek.com>
* bpo-34333: Fix %-formatting in Path.with_suffix() (GH-8663)Miss Islington (bot)2018-08-111-1/+1
| | | | | (cherry picked from commit 423d05f6f59b24c91b9ef6b2e4ac130316764382) Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
* bpo-34329: Doc'd how to remove suffix of pathlib.Path() (GH-8655)Miss Islington (bot)2018-08-031-2/+4
| | | | | (cherry picked from commit 46dc4e34ed8005a688d7f3512844ef227a3465f4) Co-authored-by: Stefan Otte <stefan.otte@gmail.com>
* bpo-31972: Improve docstrings for pathlib classes (GH-5310)Miss Islington (bot)2018-02-191-1/+29
| | | | | (cherry picked from commit dfa015cf77a148d229ddc0a5b063562c9f9664f2) Co-authored-by: chason <chason@gmail.com>
* bpo-30152: Reduce the number of imports for argparse. (#1269)Serhiy Storchaka2017-09-251-1/+1
|
* bpo-30897: Add is_mount() to pathlib.Path (#2669)Cooper Lees2017-08-011-0/+24
| | | | * Add in is_mount() call to pathlib.Path similiar to os.path.ismount(path) * Add tests for is_mount()
* bpo-30177: pathlib: include the full path in resolve(strict=False) (#1893)Antoine Pietri2017-06-071-11/+8
|
* bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489)Jon Dufresne2017-05-181-4/+1
| | | | | | | | * Replaced list(<generator expression>) with list comprehension * Replaced dict(<generator expression>) with dict comprehension * Replaced set(<list literal>) with set literal * Replaced builtin func(<list comprehension>) with func(<generator expression>) when supported (e.g. any(), all(), tuple(), min(), & max())
* bpo-30144: Import collections ABC from collections.abc rather than ↵Serhiy Storchaka2017-04-241-1/+1
| | | | collections. (#1263)
* bpo-29694: race condition in pathlib mkdir with flags parents=True (GH-1089)Armin Rigo2017-04-131-2/+2
|
* bpo-29919: Remove unused imports found by pyflakes (#137)Victor Stinner2017-03-271-1/+0
| | | Make also minor PEP8 coding style fixes on modified imports.
* bpo-29900: Simplify pathlib implementation. (#814)Serhiy Storchaka2017-03-251-29/+17
| | | | Since functions in the os module support path-like objects, explicit converting Path to str no longer needed.
* bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True) (#805)Serhiy Storchaka2017-03-241-17/+15
| | | | when the OS gives priority to errors such as EACCES over EEXIST.
* Issue #29416: Prevent infinite loop in pathlib.Path.mkdirSteve Dower2017-02-041-1/+1
|\
| * Issue #29416: Prevent infinite loop in pathlib.Path.mkdirSteve Dower2017-02-041-1/+1
| |
* | Issue #29079: Prevent infinite loop in pathlib.resolve() on WindowsSteve Dower2016-12-291-1/+3
| |
* | Issue #19717: Makes Path.resolve() succeed on paths that do not exist (patch ↵Steve Dower2016-11-091-6/+23
| | | | | | | | by Vajrasky Kok)
* | Issue #26032: Optimized globbing in pathlib by using os.scandir(); it is nowSerhiy Storchaka2016-09-071-55/+39
| | | | | | | | about 1.5--4 times faster.
* | Issue #27186: Add os.PathLike support to pathlib.Brett Cannon2016-06-101-6/+16
|/ | | | | | | | 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.
* Issue #27171: Fix typos in documentation, comments, and test function namesMartin Panter2016-06-021-1/+1
|
* Back out pathlib.Path.path attr. (Merge 3.4->3.5)Guido van Rossum2016-05-191-7/+0
|\
| * Back out 7e9605697dfc, 2e3c31ab586a, 759b2cecc289.Guido van Rossum2016-05-191-7/+0
| | | | | | | | | | | | | | 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.)
* | Issue #20589: Invoking Path.owner() and Path.group() on Windows now raiseBerker Peksag2016-03-111-0/+6
| | | | | | | | NotImplementedError instead of ImportError.
* | Issue #23076: Path.glob() now raises a ValueError if it's called with anBerker Peksag2016-01-301-0/+2
| | | | | | | | | | | | invalid pattern. Patch by Thomas Nyberg.
* | Add another try/except PermissionError to avoid depending on listdir order. ↵Guido van Rossum2016-01-071-5/+8
|\ \ | |/ | | | | Fix issues #24120 and #26012. (Merge 3.4->3.5)
| * Add another try/except PermissionError to avoid depending on listdir order. ↵Guido van Rossum2016-01-071-5/+8
| | | | | | | | Fix issues #24120 and #26012.
* | Issue #22570: Add 'path' attribute to pathlib.Path objects. (Merge 3.4->3.5)Guido van Rossum2016-01-061-0/+7
|\ \ | |/
| * Issue #22570: Add 'path' attribute to pathlib.Path objects.Guido van Rossum2016-01-061-0/+7
| |
* | Issue #26012: Don't traverse into symlinks for ** pattern in ↵Guido van Rossum2016-01-061-1/+1
|\ \ | |/ | | | | pathlib.Path.[r]glob(). (Merge 3.4->3.5)
| * Issue #26012: Don't traverse into symlinks for ** pattern in ↵Guido van Rossum2016-01-061-1/+1
| | | | | | | | pathlib.Path.[r]glob().
* | Issue #24120: Ignore PermissionError in pathlib.Path.[r]glob(). Ulrich ↵Guido van Rossum2016-01-061-25/+35
|\ \ | |/ | | | | Petri. (Merge 3.4->3.5)
| * Issue #24120: Ignore PermissionError in pathlib.Path.[r]glob(). Ulrich Petri.Guido van Rossum2016-01-061-25/+35
| |
* | Issue #25417: Remove the extra dot from docstringBerker Peksag2015-10-221-1/+1
| |
* | Issue #25417: Fix typo in Path.samefile() docstringBerker Peksag2015-10-211-2/+2
| | | | | | | | Reported by Antony Lee.
* | Issue #23146: Fix mishandling of absolute Windows paths with forward slashes ↵Antoine Pitrou2015-02-151-0/+4
|\ \ | |/ | | | | | | | | in pathlib. Detected and fixed by Serhiy.
| * Issue #23146: Fix mishandling of absolute Windows paths with forward slashes ↵Antoine Pitrou2015-02-151-0/+4
| | | | | | | | | | | | in pathlib. Detected and fixed by Serhiy.
* | Issue #21408: The default __ne__() now returns NotImplemented if __eq__()Serhiy Storchaka2015-01-261-3/+0
|\ \ | |/ | | | | returned NotImplemented. Removed incorrect implementations of __ne__().
| * Issue #21408: The default __ne__() now returns NotImplemented if __eq__()Serhiy Storchaka2015-01-261-3/+0
| | | | | | | | returned NotImplemented. Removed incorrect implementations of __ne__().
* | Issue #19777: Provide a home() classmethod on Path objects.Antoine Pitrou2015-01-121-0/+7
| | | | | | | | Contributed by Victor Salgado and Mayank Tripathi.
* | whitespaceAntoine Pitrou2014-12-301-5/+5
| |
* | Issue #19776: Add a expanduser() method on Path objects.Antoine Pitrou2014-12-301-0/+56
| | | | | | | | Patch by Serhiy.
* | Close #22370: Windows detection in pathlib is now more robust.Antoine Pitrou2014-11-181-5/+4
|\ \ | |/
| * Close #22370: Windows detection in pathlib is now more robust.Antoine Pitrou2014-11-181-5/+4
| |
* | Issue #22759: Query methods on pathlib.Path() (exists(), is_dir(), etc.) now ↵Antoine Pitrou2014-10-301-9/+9
|\ \ | |/ | | | | return False when the underlying stat call raises NotADirectoryError.