[Python-checkins] cpython (merge 3.5 -> default): merge 3.5

benjamin.peterson python-checkins at python.org
Mon Sep 5 18:39:44 EDT 2016


https://hg.python.org/cpython/rev/664f7d3b3a00
changeset: 103083:664f7d3b3a00
parent: 103081:ee32af890e27
parent: 103082:c5f557012ef8
user: Benjamin Peterson <benjamin at python.org>
date: Mon Sep 05 15:35:45 2016 -0700
summary:
 merge 3.5
files:
 Misc/NEWS | 3 +++
 Modules/clinic/posixmodule.c.h | 6 +++---
 Modules/posixmodule.c | 6 +++---
 3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -107,6 +107,9 @@
 - Issue #27842: The csv.DictReader now returns rows of type OrderedDict.
 (Contributed by Steve Holden.)
 
+- Remove support for passing a file descriptor to os.access. It never worked but
+ previously didn't raise.
+
 - Issue #12885: Fix error when distutils encounters symlink.
 
 - Issue #27881: Fixed possible bugs when setting sqlite3.Connection.isolation_level.
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
@@ -100,7 +100,7 @@
 "Use the real uid/gid to test for access to a path.\n"
 "\n"
 " path\n"
-" Path to be tested; can be string, bytes, or open-file-descriptor int.\n"
+" Path to be tested; can be string or bytes\n"
 " mode\n"
 " Operating-system mode bitfield. Can be F_OK to test existence,\n"
 " or the inclusive-OR of R_OK, W_OK, and X_OK.\n"
@@ -137,7 +137,7 @@
 PyObject *return_value = NULL;
 static const char * const _keywords[] = {"path", "mode", "dir_fd", "effective_ids", "follow_symlinks", NULL};
 static _PyArg_Parser _parser = {"O&i|$O&pp:access", _keywords, 0};
- path_t path = PATH_T_INITIALIZE("access", "path", 0, 1);
+ path_t path = PATH_T_INITIALIZE("access", "path", 0, 0);
 int mode;
 int dir_fd = DEFAULT_DIR_FD;
 int effective_ids = 0;
@@ -6042,4 +6042,4 @@
 #ifndef OS_SET_HANDLE_INHERITABLE_METHODDEF
 #define OS_SET_HANDLE_INHERITABLE_METHODDEF
 #endif /* !defined(OS_SET_HANDLE_INHERITABLE_METHODDEF) */
-/*[clinic end generated code: output=97180b6734421a7d input=a9049054013a1b77]*/
+/*[clinic end generated code: output=2b85bb3703a6488a input=a9049054013a1b77]*/
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -2595,8 +2595,8 @@
 /*[clinic input]
 os.access -> bool
 
- path: path_t(allow_fd=True)
- Path to be tested; can be string, bytes, or open-file-descriptor int.
+ path: path_t
+ Path to be tested; can be string or bytes
 
 mode: int
 Operating-system mode bitfield. Can be F_OK to test existence,
@@ -2634,7 +2634,7 @@
 static int
 os_access_impl(PyObject *module, path_t *path, int mode, int dir_fd,
 int effective_ids, int follow_symlinks)
-/*[clinic end generated code: output=cf84158bc90b1a77 input=b75a756797af45ec]*/
+/*[clinic end generated code: output=cf84158bc90b1a77 input=8e8c3a6ba791fee3]*/
 {
 int return_value;
 
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /