[Python-checkins] gh-96288: Add a sentence to `os.mkdir`'s docstring. (#96271)

JelleZijlstra webhook-mailer at python.org
Fri Oct 7 18:06:26 EDT 2022


https://github.com/python/cpython/commit/1523c9e9d47e7d67e4889987ff0f38eb7b881fdd
commit: 1523c9e9d47e7d67e4889987ff0f38eb7b881fdd
branch: main
author: Hagai Helman Tov <hagai.helman at gmail.com>
committer: JelleZijlstra <jelle.zijlstra at gmail.com>
date: 2022-10-07T15:06:16-07:00
summary:

gh-96288: Add a sentence to `os.mkdir`'s docstring. (#96271)

files:
M Modules/clinic/posixmodule.c.h
M Modules/posixmodule.c

diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h
index 7fac07804686..31bd01d1c3c1 100644
--- a/Modules/clinic/posixmodule.c.h
+++ b/Modules/clinic/posixmodule.c.h
@@ -1849,7 +1849,8 @@ PyDoc_STRVAR(os_mkdir__doc__,
 "dir_fd may not be implemented on your platform.\n"
 "  If it is unavailable, using it will raise a NotImplementedError.\n"
 "\n"
-"The mode argument is ignored on Windows.");
+"The mode argument is ignored on Windows. Where it is used, the current umask\n"
+"value is first masked out.");
 
 #define OS_MKDIR_METHODDEF    \
     {"mkdir", _PyCFunction_CAST(os_mkdir), METH_FASTCALL|METH_KEYWORDS, os_mkdir__doc__},
@@ -11367,4 +11368,4 @@ os_waitstatus_to_exitcode(PyObject *module, PyObject *const *args, Py_ssize_t na
 #ifndef OS_WAITSTATUS_TO_EXITCODE_METHODDEF
     #define OS_WAITSTATUS_TO_EXITCODE_METHODDEF
 #endif /* !defined(OS_WAITSTATUS_TO_EXITCODE_METHODDEF) */
-/*[clinic end generated code: output=dd43d388b442c96d input=a9049054013a1b77]*/
+/*[clinic end generated code: output=471ab8f2ad3d46b0 input=a9049054013a1b77]*/
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index a72d57771c22..1e556fc904b7 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -4539,12 +4539,13 @@ If dir_fd is not None, it should be a file descriptor open to a directory,
 dir_fd may not be implemented on your platform.
   If it is unavailable, using it will raise a NotImplementedError.
 
-The mode argument is ignored on Windows.
+The mode argument is ignored on Windows. Where it is used, the current umask
+value is first masked out.
 [clinic start generated code]*/
 
 static PyObject *
 os_mkdir_impl(PyObject *module, path_t *path, int mode, int dir_fd)
-/*[clinic end generated code: output=a70446903abe821f input=e965f68377e9b1ce]*/
+/*[clinic end generated code: output=a70446903abe821f input=a61722e1576fab03]*/
 {
     int result;
 #ifdef HAVE_MKDIRAT



More information about the Python-checkins mailing list