]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39567: Document audit for os.walk, os.fwalk, Path.glob and Path.rglob. (GH-18499)
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 8 Mar 2020 12:31:47 +0000 (14:31 +0200)
committerGitHub <noreply@github.com>
Sun, 8 Mar 2020 12:31:47 +0000 (14:31 +0200)
Doc/library/os.rst
Doc/library/pathlib.rst

index af02a373f33dc064b083c40230b6f5da7b4c05f6..c9d6fb232c0a8e0614991a3337395f2b6ad9a24f 100644 (file)
@@ -3053,6 +3053,8 @@ features:
           for name in dirs:
               os.rmdir(os.path.join(root, name))
 
+   .. audit-event:: os.walk top,topdown,onerror,followlinks os.walk
+
    .. versionchanged:: 3.5
       This function now calls :func:`os.scandir` instead of :func:`os.listdir`,
       making it faster by reducing the number of calls to :func:`os.stat`.
@@ -3112,6 +3114,8 @@ features:
           for name in dirs:
               os.rmdir(name, dir_fd=rootfd)
 
+   .. audit-event:: os.fwalk top,topdown,onerror,follow_symlinks,dir_fd os.fwalk
+
    .. availability:: Unix.
 
    .. versionadded:: 3.3
index 7c0ffd50e2c794579ee5d9c5c0fc16a8c33dff68..004c156e118852cbe5eb90c3de09851dbebc7b4e 100644 (file)
@@ -763,6 +763,8 @@ call fails (for example because the path doesn't exist).
       Using the "``**``" pattern in large directory trees may consume
       an inordinate amount of time.
 
+   .. audit-event:: pathlib.Path.glob self,pattern pathlib.Path.glob
+
 
 .. method:: Path.group()
 
@@ -1025,6 +1027,8 @@ call fails (for example because the path doesn't exist).
        PosixPath('setup.py'),
        PosixPath('test_pathlib.py')]
 
+   .. audit-event:: pathlib.Path.rglob self,pattern pathlib.Path.rglob
+
 
 .. method:: Path.rmdir()