Miss Islington (bot)
8d0f36940e
bpo-38811: Check for presence of os.link method in pathlib (GH-17225)
...
Commit 6b5b013bcc ("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 092435e932 )
Co-authored-by: Toke Høiland-Jørgensen <toke@redhat.com >
2019-12-16 04:42:20 -08:00
Miss Skeleton (bot)
2f8d4f08e2
bpo-31202: Preserve case of literal parts in Path.glob() on Windows. (GH-16860)
...
(cherry picked from commit 10ecbadb79 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com >
2019-10-21 11:17:57 -07:00
Miss Islington (bot)
98a4a713d0
bpo-37935: Added tests for os.walk(), glob.iglob() and Path.glob() (GH-15956) (GH-16043)
...
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 ).
(cherry picked from commit f9dc2ad890 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com >
2019-09-12 16:07:47 +01:00
Miss Islington (bot)
cbd7b2a399
bpo-31163: Added return values to pathlib.Path instance's rename and replace methods. (GH-13582) (GH-15944)
...
* bpo-31163: Added return values to pathlib.Path instance's rename and replace methods.
(cherry picked from commit 088a09af4b )
Co-authored-by: hui shang <shangdahao@gmail.com >
2019-09-11 15:12:54 +01:00
Steve Dower
206e4c3d35
bpo-38087: Fix case sensitivity in test_pathlib and test_ntpath (GH-15850)
2019-09-10 15:29:28 +01:00
Miss Islington (bot)
4adcaf8151
bpo-34775: Return NotImplemented in PurePath division. (GH-9509) (GH-15172)
...
(cherry picked from commit 4c69be22df )
Co-authored-by: aiudirog <aiudirog@gmail.com >
2019-08-29 01:05:59 -04:00
Jörg Stucke
d5c120f7eb
bpo-36035: fix Path.rglob for broken links (GH-11988)
...
Links creating an infinite symlink loop would raise an exception.
2019-05-21 19:44:40 +02:00
zlohhcuB treboR
d9e006bcef
bpo-33123: pathlib: Add missing_ok parameter to Path.unlink (GH-6191)
...
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
2019-05-15 15:02:11 -07:00
Joannah Nanjekye
6b5b013bcc
bpo-26978: Implement pathlib.Path.link_to (Using os.link) (GH-12990)
2019-05-04 17:27:10 +02:00
Anthony Shaw
83da926b89
bpo-35488: Add tests for ** glob matching in pathlib (GH-11171)
2019-01-06 12:31:29 -08:00
Steve Dower
0cd6391fd8
bpo-34977: Add Windows App Store package (GH-11027)
...
Also adds the PC/layout script for generating layouts on Windows.
2018-12-10 18:52:57 -08:00
Victor Stinner
cb0b78a070
Revert "bpo-34977: Add Windows App Store package (GH-10245)" (GH-11019)
...
This reverts commit 468a15aaf9 .
2018-12-07 12:57:43 +01:00
Steve Dower
468a15aaf9
bpo-34977: Add Windows App Store package (GH-10245)
2018-12-06 21:09:20 -08:00
Serhiy Storchaka
0185f34ddc
bpo-33721: Make some os.path functions and pathlib.Path methods be tolerant 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.
2018-09-18 11:28:51 +03:00
Przemysław Spodymek
216b745eaf
bpo-33635: Handling Bad file descriptor in Path.is_file and related. (GH-8542)
2018-08-27 14:33:45 -07:00
Berker Peksag
423d05f6f5
bpo-34333: Fix %-formatting in Path.with_suffix() (GH-8663)
2018-08-11 08:45:06 +03:00
Steve Dower
e5f41d2f1e
bpo-33522: Enable CI builds on Visual Studio Team Services ( #6865 )
2018-05-16 17:50:29 -04:00
Anders Kaseorg
5c0d462689
bpo-32601: Let test_expanduser use the same user if no others found. (GH-5246)
...
This happens in the NixOS build sandbox, for example, where the only
other user is nobody with home directory /.
2018-05-14 17:00:37 +03:00
Serhiy Storchaka
b21d155f57
bpo-32964: Reuse a testing implementation of the path protocol in tests. ( #5930 )
2018-03-02 11:53:51 +02:00
xdegaye
92c2ca7633
bpo-28759: Skip some tests on PermissionError raised by Android (GH-4350)
...
Access to mkfifo(), mknod() and hard link creation is controled
by SELinux on Android.
Also remove test.support.android_not_root.
2017-11-12 17:31:07 +01:00
Cooper Lees
173ff4a58a
bpo-30897: Add is_mount() to pathlib.Path ( #2669 )
...
* Add in is_mount() call to pathlib.Path similiar to os.path.ismount(path)
* Add tests for is_mount()
2017-08-01 15:35:45 -07:00
Antoine Pietri
add98eb4fe
bpo-30177: pathlib: include the full path in resolve(strict=False) ( #1893 )
2017-06-07 08:29:17 -07:00
Serhiy Storchaka
2e576f5aec
bpo-30144: Import collections ABC from collections.abc rather than collections. ( #1263 )
2017-04-24 09:05:00 +03:00
Armin Rigo
22a594a004
bpo-29694: race condition in pathlib mkdir with flags parents=True (GH-1089)
2017-04-13 11:08:15 -07:00
Vajrasky Kok
ec1f5df46e
bpo-19791: Use functions from test support to check the symlink support. (GH-822)
2017-03-28 12:32:35 -07:00