#14807: move undocumented tarfile.filemode() to stat.filemode(). Add tarfile.filemode alias with deprecation warning.
diff --git a/Doc/library/stat.rst b/Doc/library/stat.rst
index 7de98b6..f47f464 100644
--- a/Doc/library/stat.rst
+++ b/Doc/library/stat.rst
@@ -104,6 +104,16 @@
    if __name__ == '__main__':
        walktree(sys.argv[1], visitfile)
 
+An additional utility function is provided to covert a file's mode in a human
+readable string:
+
+.. function:: filemode(mode)
+
+   Convert a file's mode to a string of the form '-rwxrwxrwx'.
+
+   .. versionadded:: 3.3
+
+
 All the variables below are simply symbolic indexes into the 10-tuple returned
 by :func:`os.stat`, :func:`os.fstat` or :func:`os.lstat`.
 
@@ -344,4 +354,3 @@
    The file is a snapshot file.
 
 See the \*BSD or Mac OS systems man page :manpage:`chflags(2)` for more information.
-
diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst
index 148324e..ac01236 100644
--- a/Doc/whatsnew/3.3.rst
+++ b/Doc/whatsnew/3.3.rst
@@ -1177,6 +1177,14 @@
 
   (Contributed by Colin Marc in :issue:`14204`)
 
+stat
+----
+
+- The undocumented tarfile.filemode function has been moved to
+  :func:`stat.filemode`. It can be used to convert a file's mode to a string of
+  the form '-rwxrwxrwx'.
+
+  (Contributed by Giampaolo Rodolà in :issue:`14807`)
 
 sys
 ---