| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
`PosixPathTest.test_expanduser` (GH-30240)
Ensure `fakeuser` does not exist in `PosixPathTest.test_expanduser`
(cherry picked from commit b8de8b7039cee47465b2af9950b0b9ed2d3f2903)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
| |
(cherry picked from commit d8880677a79ba4e70bbe7583eecf573bfceb7e98)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
|
|
|
| |
Fix typos in the Lib directory as identified by codespell.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 745c9d9dfc1ad6fdfdf1d07420c6273ff67fa5be)
Automerge-Triggered-By: GH:JulienPalard
|
|
|
|
|
|
|
|
|
|
| |
(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 94ad6c674f7687ef22853cb8d42b440d6b42ddc8)
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
|
|
|
|
| |
Add PurePath.with_stem()
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a "readlink" method to pathlib.Path objects that calls through
to os.readlink.
https://bugs.python.org/issue30618
Automerge-Triggered-By: @gpshead
|
| |
|
|
|
|
|
| |
Test that they do not keep too many file descriptors open for the host OS in a reasonable test scenario.
See [bpo-37935](https://bugs.python.org/issue37935).
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
| |
Also adds the PC/layout script for generating layouts on Windows.
|
|
|
| |
This reverts commit 468a15aaf9206448a744fc5eab3fc21f51966aad.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This happens in the NixOS build sandbox, for example, where the only
other user is nobody with home directory /.
|
| |
|
|
|
|
|
|
| |
Access to mkfifo(), mknod() and hard link creation is controled
by SELinux on Android.
Also remove test.support.android_not_root.
|
|
|
|
| |
* Add in is_mount() call to pathlib.Path similiar to os.path.ismount(path)
* Add tests for is_mount()
|
| |
|
|
|
|
| |
collections. (#1263)
|
| |
|
|
|
|
| |
(GH-822)
|
|
|
|
| |
when the OS gives priority to errors such as EACCES over EEXIST.
|
|\ |
|
| | |
|
| |
| |
| |
| | |
on Android for a non-root user.
|
| |
| |
| |
| | |
a non-root user on Android where access rights are controled by SELinux MAC.
|
| |
| |
| |
| | |
assuming some invariants about uids that are not valid for Android.
|
| |
| |
| |
| | |
by Vajrasky Kok)
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.)
|