| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
| |
(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>
|
| |
|
|
|
| |
(cherry picked from commit 704e2065f8b8021a4a6999470fb6ed3453f7679e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
insufficient permissions (GH-18815)
Co-authored-by: Matt Wozniski <mwozniski@bloomberg.net>
(cherry picked from commit eb7560a73d46800e4ade4a8869139b48e6c92811)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit c45a2aa9e255b5c7c211faa79f6b23895b64ab27)
Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
(cherry picked from commit 092435e932dee1802784ec28f39454f50fdd879a)
Co-authored-by: Toke Høiland-Jørgensen <toke@redhat.com>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
| |
(cherry picked from commit 10ecbadb799ddf3393d1fc80119a3db14724d381)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
methods. (GH-13582) (GH-15944)
* bpo-31163: Added return values to pathlib.Path instance's rename and replace methods.
(cherry picked from commit 088a09af4bdeff52b9dedeb7acd1e82069f37d98)
Co-authored-by: hui shang <shangdahao@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 4c69be22df3852f17873a74d015528d9a8ae92d6)
Co-authored-by: aiudirog <aiudirog@gmail.com>
|
| |
|
| |
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.
|
| |\ |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
by Vajrasky Kok)
|
| | |
| |
| |
| | |
about 1.5--4 times faster.
|
| |/
|
|
|
|
|
|
| |
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.
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| | |
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.)
|
| | |
| |
| |
| | |
NotImplementedError instead of ImportError.
|
| | |
| |
| |
| |
| |
| | |
invalid pattern.
Patch by Thomas Nyberg.
|
| |\ \
| |/
| |
| | |
Fix issues #24120 and #26012. (Merge 3.4->3.5)
|
| | |
| |
| |
| | |
Fix issues #24120 and #26012.
|
| |\ \
| |/ |
|
| | | |
|
| |\ \
| |/
| |
| | |
pathlib.Path.[r]glob(). (Merge 3.4->3.5)
|
| | |
| |
| |
| | |
pathlib.Path.[r]glob().
|
| |\ \
| |/
| |
| | |
Petri. (Merge 3.4->3.5)
|