do not pretend to support passing a fd to access()
This commit is contained in:
parent
9ed756bc21
commit
768f3b4492
|
@ -62,6 +62,9 @@ Library
|
||||||
|
|
||||||
- Issue #26470: Port ssl and hashlib module to OpenSSL 1.1.0.
|
- Issue #26470: Port ssl and hashlib module to OpenSSL 1.1.0.
|
||||||
|
|
||||||
|
- 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 #12885: Fix error when distutils encounters symlink.
|
||||||
|
|
||||||
- Issue #27881: Fixed possible bugs when setting sqlite3.Connection.isolation_level.
|
- Issue #27881: Fixed possible bugs when setting sqlite3.Connection.isolation_level.
|
||||||
|
|
|
@ -96,7 +96,7 @@ PyDoc_STRVAR(os_access__doc__,
|
||||||
"Use the real uid/gid to test for access to a path.\n"
|
"Use the real uid/gid to test for access to a path.\n"
|
||||||
"\n"
|
"\n"
|
||||||
" path\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"
|
" mode\n"
|
||||||
" Operating-system mode bitfield. Can be F_OK to test existence,\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"
|
" or the inclusive-OR of R_OK, W_OK, and X_OK.\n"
|
||||||
|
@ -132,7 +132,7 @@ os_access(PyObject *module, PyObject *args, PyObject *kwargs)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
static char *_keywords[] = {"path", "mode", "dir_fd", "effective_ids", "follow_symlinks", NULL};
|
static char *_keywords[] = {"path", "mode", "dir_fd", "effective_ids", "follow_symlinks", NULL};
|
||||||
path_t path = PATH_T_INITIALIZE("access", "path", 0, 1);
|
path_t path = PATH_T_INITIALIZE("access", "path", 0, 0);
|
||||||
int mode;
|
int mode;
|
||||||
int dir_fd = DEFAULT_DIR_FD;
|
int dir_fd = DEFAULT_DIR_FD;
|
||||||
int effective_ids = 0;
|
int effective_ids = 0;
|
||||||
|
@ -5784,4 +5784,4 @@ exit:
|
||||||
#ifndef OS_SET_HANDLE_INHERITABLE_METHODDEF
|
#ifndef OS_SET_HANDLE_INHERITABLE_METHODDEF
|
||||||
#define OS_SET_HANDLE_INHERITABLE_METHODDEF
|
#define OS_SET_HANDLE_INHERITABLE_METHODDEF
|
||||||
#endif /* !defined(OS_SET_HANDLE_INHERITABLE_METHODDEF) */
|
#endif /* !defined(OS_SET_HANDLE_INHERITABLE_METHODDEF) */
|
||||||
/*[clinic end generated code: output=c27221987f987cf3 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=9d5f831b23145d1e input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -2517,8 +2517,8 @@ os_lstat_impl(PyObject *module, path_t *path, int dir_fd)
|
||||||
/*[clinic input]
|
/*[clinic input]
|
||||||
os.access -> bool
|
os.access -> bool
|
||||||
|
|
||||||
path: path_t(allow_fd=True)
|
path: path_t
|
||||||
Path to be tested; can be string, bytes, or open-file-descriptor int.
|
Path to be tested; can be string or bytes
|
||||||
|
|
||||||
mode: int
|
mode: int
|
||||||
Operating-system mode bitfield. Can be F_OK to test existence,
|
Operating-system mode bitfield. Can be F_OK to test existence,
|
||||||
|
@ -2556,7 +2556,7 @@ Note that most operations will use the effective uid/gid, therefore this
|
||||||
static int
|
static int
|
||||||
os_access_impl(PyObject *module, path_t *path, int mode, int dir_fd,
|
os_access_impl(PyObject *module, path_t *path, int mode, int dir_fd,
|
||||||
int effective_ids, int follow_symlinks)
|
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;
|
int return_value;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue