Skip to content

Commit db283b3

Browse files
bpo-39567: Document audit for os.walk, os.fwalk, Path.glob and Path.rglob. (pythonGH-18499)
1 parent eb4e2ae commit db283b3

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Doc/library/os.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3053,6 +3053,8 @@ features:
30533053
for name in dirs:
30543054
os.rmdir(os.path.join(root, name))
30553055

3056+
.. audit-event:: os.walk top,topdown,onerror,followlinks os.walk
3057+
30563058
.. versionchanged:: 3.5
30573059
This function now calls :func:`os.scandir` instead of :func:`os.listdir`,
30583060
making it faster by reducing the number of calls to :func:`os.stat`.
@@ -3112,6 +3114,8 @@ features:
31123114
for name in dirs:
31133115
os.rmdir(name, dir_fd=rootfd)
31143116

3117+
.. audit-event:: os.fwalk top,topdown,onerror,follow_symlinks,dir_fd os.fwalk
3118+
31153119
.. availability:: Unix.
31163120

31173121
.. versionadded:: 3.3

Doc/library/pathlib.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,8 @@ call fails (for example because the path doesn't exist).
763763
Using the "``**``" pattern in large directory trees may consume
764764
an inordinate amount of time.
765765

766+
.. audit-event:: pathlib.Path.glob self,pattern pathlib.Path.glob
767+
766768

767769
.. method:: Path.group()
768770

@@ -1025,6 +1027,8 @@ call fails (for example because the path doesn't exist).
10251027
PosixPath('setup.py'),
10261028
PosixPath('test_pathlib.py')]
10271029

1030+
.. audit-event:: pathlib.Path.rglob self,pattern pathlib.Path.rglob
1031+
10281032

10291033
.. method:: Path.rmdir()
10301034

0 commit comments

Comments
 (0)