[Python-checkins] cpython (merge 3.6 -> default): Issue #29092: Merge 3.6.

xiang.zhang python-checkins at python.org
Sun Jan 22 00:18:45 EST 2017


https://hg.python.org/cpython/rev/cee9d322178f
changeset:   106259:cee9d322178f
parent:      106256:597515fcb343
parent:      106258:409ffea5cccf
user:        Xiang Zhang <angwerzx at 126.com>
date:        Sun Jan 22 13:10:12 2017 +0800
summary:
  Issue #29092: Merge 3.6.

files:
  Doc/library/os.rst             |  2 +-
  Modules/clinic/posixmodule.c.h |  5 +++--
  Modules/posixmodule.c          |  5 +++--
  3 files changed, 7 insertions(+), 5 deletions(-)


diff --git a/Doc/library/os.rst b/Doc/library/os.rst
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -2213,7 +2213,7 @@
 
    Get the status of a file or a file descriptor. Perform the equivalent of a
    :c:func:`stat` system call on the given path. *path* may be specified as
-   either a string -- directly or indirectly through the :class:`PathLike`
+   either a string or bytes -- directly or indirectly through the :class:`PathLike`
    interface -- or as an open file descriptor. Return a :class:`stat_result`
    object.
 
diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h
--- a/Modules/clinic/posixmodule.c.h
+++ b/Modules/clinic/posixmodule.c.h
@@ -9,7 +9,8 @@
 "Perform a stat system call on the given path.\n"
 "\n"
 "  path\n"
-"    Path to be examined; can be string, bytes, or open-file-descriptor int.\n"
+"    Path to be examined; can be string, bytes, path-like object or\n"
+"    open-file-descriptor int.\n"
 "  dir_fd\n"
 "    If not None, it should be a file descriptor open to a directory,\n"
 "    and path should be a relative string; path will then be relative to\n"
@@ -6492,4 +6493,4 @@
 #ifndef OS_GETRANDOM_METHODDEF
     #define OS_GETRANDOM_METHODDEF
 #endif /* !defined(OS_GETRANDOM_METHODDEF) */
-/*[clinic end generated code: output=30cdd28fc524f2fb input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5a0be969e3f71660 input=a9049054013a1b77]*/
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -2386,7 +2386,8 @@
 os.stat
 
     path : path_t(allow_fd=True)
-        Path to be examined; can be string, bytes, or open-file-descriptor int.
+        Path to be examined; can be string, bytes, path-like object or
+        open-file-descriptor int.
 
     *
 
@@ -2413,7 +2414,7 @@
 
 static PyObject *
 os_stat_impl(PyObject *module, path_t *path, int dir_fd, int follow_symlinks)
-/*[clinic end generated code: output=7d4976e6f18a59c5 input=099d356c306fa24a]*/
+/*[clinic end generated code: output=7d4976e6f18a59c5 input=270bd64e7bb3c8f7]*/
 {
     return posix_do_stat("stat", path, dir_fd, follow_symlinks);
 }

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list