mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
GH-113568: Stop raising auditing events from pathlib ABCs (#113571)
Raise auditing events in `pathlib.Path.glob()`, `rglob()` and `walk()`, but not in `pathlib._abc.PathBase` methods. Also move generation of a deprecation warning into `pathlib.Path` so it gets the right stack level.
This commit is contained in:
parent
99854ce170
commit
3c4e972d6d
5 changed files with 64 additions and 35 deletions
|
@ -1266,19 +1266,6 @@ class DummyPathTest(DummyPurePathTest):
|
|||
bad_link.symlink_to("bad" * 200)
|
||||
self.assertEqual(sorted(base.glob('**/*')), [bad_link])
|
||||
|
||||
def test_glob_recursive_no_trailing_slash(self):
|
||||
P = self.cls
|
||||
p = P(self.base)
|
||||
with self.assertWarns(FutureWarning):
|
||||
p.glob('**')
|
||||
with self.assertWarns(FutureWarning):
|
||||
p.glob('*/**')
|
||||
with self.assertWarns(FutureWarning):
|
||||
p.rglob('**')
|
||||
with self.assertWarns(FutureWarning):
|
||||
p.rglob('*/**')
|
||||
|
||||
|
||||
def test_readlink(self):
|
||||
if not self.can_symlink:
|
||||
self.skipTest("symlinks required")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue