| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
a path (GH-25264) (GH-135035)
Also adds a new "strict" argument to realpath() to avoid changing the default behaviour of pathlib while sharing the implementation.
(cherry-picked from commit baecfbd849dbf42360d3a84af6cc13160838f24d)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
(GH-26698) (#27422)
`pathlib.PureWindowsPath.is_reserved()` now identifies as reserved
filenames with trailing spaces or colons.
Co-authored-by: Barney Gale <barney.gale@foundry.com>
Co-authored-by: Eryk Sun <eryksun@gmail.com>
(cherry picked from commit 56c1f6d7edad454f382d3ecb8cdcff24ac898a50)
|
| |
|
|
|
| |
(cherry picked from commit 96d5c7038b06e93d20822d28ed42a2183f876857)
Co-authored-by: Kevin Follstad <kfollstad@gmail.com>
|
| |
|
|
|
|
|
| |
invalid filename (GH-25529)
(cherry picked from commit 4696f1285d83dd7b69f459c63e14080b1f87f797)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
| |
|
| |
Co-authored-by: Barney Gale <barney.gale@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-20554)
(cherry picked from commit f97e42ef4d97dee64f45ed65170a6e77c8e46fdf)
Co-authored-by: Ram Rachum <ram@rachum.com>
|
| |
|
|
|
| |
(cherry picked from commit 94ad6c674f7687ef22853cb8d42b440d6b42ddc8)
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-19611)
Co-authored-by: Sadhana Srinivasan <rotuna@Sadhanas-MBP.fritz.box>
(cherry picked from commit 448325369ff73011d34d6c3a493014fe3ead8843)
Co-authored-by: Rotuna <sadhanasrinivasan@protonmail.com>
|
| |
|
|
| |
Add PurePath.with_stem()
|
| |
|
|
| |
path accessor (GH-18836)
|
| |
|
|
| |
`is_mount()` misbehave in `Path` subclasses. (GH-18839)
|
| |
|
|
| |
the path accessor. (GH-18844)
|
| |
|
|
|
|
| |
for "closing" a path by using it as a context manager (GH-18846)
Support for using a path as a context manager remains, and is now a no-op.
|
| | |
|
| |
|
|
|
| |
insufficient permissions (GH-18815)
Co-authored-by: Matt Wozniski <mwozniski@bloomberg.net>
|
| |
|
|
| |
Path.rglob(). (GH-18372)
|
| |
|
|
|
|
|
|
|
| |
Windows (GH-17961)
In bpo-36264 os.path.expanduser was changed to ignore HOME on Windows.
Path.expanduser/home still honored HOME despite being documented as behaving the same
as os.path.expanduser. This makes them also ignore HOME so that both implementations
behave the same way again.
|
| |
|
|
|
|
|
|
|
|
|
| |
Commit 6b5b013bcc22 ("bpo-26978: Implement pathlib.Path.link_to (Using
os.link) (GH-12990)") introduced a new link_to method in pathlib. However,
this makes pathlib crash when the 'os' module is missing a 'link' method.
Fix this by checking for the presence of the 'link' method on pathlib
module import, and if it's not present, turn it into a runtime error like
those emitted when there is no lchmod() or symlink().
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
|
| |
|
| |
https://bugs.python.org/issue38994
|
| |
|
|
|
| |
(GH-17170)" (#17219)
This reverts commit 111772fc27cfe388bc060f019d68a3e33481ec65.
|
| |
|
|
|
| |
Fix also the Path.symplink() method implementation for the case when
symlinks are not supported.
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
This adds a "readlink" method to pathlib.Path objects that calls through
to os.readlink.
https://bugs.python.org/issue30618
Automerge-Triggered-By: @gpshead
|
| | |
|
| |
|
|
|
| |
methods. (GH-13582)
* bpo-31163: Added return values to pathlib.Path instance's rename and replace methods.
|
| | |
|
| | |
|
| |
|
| |
Links creating an infinite symlink loop would raise an exception.
|
| |
|
|
|
|
| |
Similarly to how several pathlib file creation functions have an "exists_ok" parameter, we should introduce "missing_ok" that makes removal functions not raise an exception when a file or directory is already absent. IMHO, this should cover Path.unlink and Path.rmdir. Note, Path.resolve() has a "strict" parameter since 3.6 that does the same thing. Naming this of this new parameter tries to be consistent with the "exists_ok" parameter as that is more explicit about what it does (as opposed to "strict").
https://bugs.python.org/issue33123
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Original patch by Mike Short
https://bugs.python.org/issue22062
|
| |
|
|
| |
existence on drives that are not ready (GH-11746)
|
| |
|
|
|
|
|
|
|
|
| |
to invalid paths. (#7695)
Such functions as os.path.exists(), os.path.lexists(), os.path.isdir(),
os.path.isfile(), os.path.islink(), and os.path.ismount() now return False
instead of raising ValueError or its subclasses UnicodeEncodeError
and UnicodeDecodeError for paths that contain characters or bytes
unrepresentative at the OS level.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
* Add in is_mount() call to pathlib.Path similiar to os.path.ismount(path)
* Add tests for is_mount()
|
| | |
|
| |
|
|
|
|
|
|
| |
* 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())
|
| |
|
|
| |
collections. (#1263)
|
| | |
|
| |
|
| |
Make also minor PEP8 coding style fixes on modified imports.
|
| |
|
|
| |
Since functions in the os module support path-like objects, explicit
converting Path to str no longer needed.
|
| |
|
|
| |
when the OS gives priority to errors such as EACCES over EEXIST.
|
| |\ |
|
| | | |
|
| | | |
|