@@ -2446,7 +2446,7 @@ class sched_param_converter(CConverter):
2446
2446
os.stat
2447
2447
2448
2448
path : path_t(allow_fd=True)
2449
- Path to be examined; can be string, bytes, path-like object or
2449
+ Path to be examined; can be string, bytes, a path-like object or
2450
2450
open-file-descriptor int.
2451
2451
2452
2452
*
@@ -2474,7 +2474,7 @@ It's an error to use dir_fd or follow_symlinks when specifying path as
2474
2474
2475
2475
static PyObject *
2476
2476
os_stat_impl (PyObject * module , path_t * path , int dir_fd , int follow_symlinks )
2477
- /*[clinic end generated code: output=7d4976e6f18a59c5 input=270bd64e7bb3c8f7 ]*/
2477
+ /*[clinic end generated code: output=7d4976e6f18a59c5 input=01d362ebcc06996b ]*/
2478
2478
{
2479
2479
return posix_do_stat ("stat" , path , dir_fd , follow_symlinks );
2480
2480
}
@@ -2508,7 +2508,7 @@ os_lstat_impl(PyObject *module, path_t *path, int dir_fd)
2508
2508
os.access -> bool
2509
2509
2510
2510
path: path_t
2511
- Path to be tested; can be string or bytes
2511
+ Path to be tested; can be string, bytes, or a path-like object.
2512
2512
2513
2513
mode: int
2514
2514
Operating-system mode bitfield. Can be F_OK to test existence,
@@ -2546,7 +2546,7 @@ Note that most operations will use the effective uid/gid, therefore this
2546
2546
static int
2547
2547
os_access_impl (PyObject * module , path_t * path , int mode , int dir_fd ,
2548
2548
int effective_ids , int follow_symlinks )
2549
- /*[clinic end generated code: output=cf84158bc90b1a77 input=8e8c3a6ba791fee3 ]*/
2549
+ /*[clinic end generated code: output=cf84158bc90b1a77 input=3ffe4e650ee3bf20 ]*/
2550
2550
{
2551
2551
int return_value ;
2552
2552
@@ -2738,7 +2738,7 @@ os_fchdir_impl(PyObject *module, int fd)
2738
2738
os.chmod
2739
2739
2740
2740
path: path_t(allow_fd='PATH_HAVE_FCHMOD')
2741
- Path to be modified. May always be specified as a str or bytes .
2741
+ Path to be modified. May always be specified as a str, bytes, or a path-like object .
2742
2742
On some platforms, path may also be specified as an open file descriptor.
2743
2743
If this functionality is unavailable, using it raises an exception.
2744
2744
@@ -2769,7 +2769,7 @@ dir_fd and follow_symlinks may not be implemented on your platform.
2769
2769
static PyObject *
2770
2770
os_chmod_impl (PyObject * module , path_t * path , int mode , int dir_fd ,
2771
2771
int follow_symlinks )
2772
- /*[clinic end generated code: output=5cf6a94915cc7bff input=7f1618e5e15cc196 ]*/
2772
+ /*[clinic end generated code: output=5cf6a94915cc7bff input=989081551c00293b ]*/
2773
2773
{
2774
2774
int result ;
2775
2775
@@ -3089,7 +3089,7 @@ os_fdatasync_impl(PyObject *module, int fd)
3089
3089
os.chown
3090
3090
3091
3091
path : path_t(allow_fd='PATH_HAVE_FCHOWN')
3092
- Path to be examined; can be string, bytes, or open-file-descriptor int.
3092
+ Path to be examined; can be string, bytes, a path-like object, or open-file-descriptor int.
3093
3093
3094
3094
uid: uid_t
3095
3095
@@ -3127,7 +3127,7 @@ dir_fd and follow_symlinks may not be implemented on your platform.
3127
3127
static PyObject *
3128
3128
os_chown_impl (PyObject * module , path_t * path , uid_t uid , gid_t gid ,
3129
3129
int dir_fd , int follow_symlinks )
3130
- /*[clinic end generated code: output=4beadab0db5f70cd input=a61cc35574814d5d ]*/
3130
+ /*[clinic end generated code: output=4beadab0db5f70cd input=b08c5ec67996a97d ]*/
3131
3131
{
3132
3132
int result ;
3133
3133
@@ -3654,7 +3654,7 @@ os.listdir
3654
3654
3655
3655
Return a list containing the names of the files in the directory.
3656
3656
3657
- path can be specified as either str or bytes . If path is bytes,
3657
+ path can be specified as either str, bytes, or a path-like object . If path is bytes,
3658
3658
the filenames returned will also be bytes; in all other circumstances
3659
3659
the filenames returned will be str.
3660
3660
If path is None, uses the path='.'.
@@ -3670,7 +3670,7 @@ entries '.' and '..' even if they are present in the directory.
3670
3670
3671
3671
static PyObject *
3672
3672
os_listdir_impl (PyObject * module , path_t * path )
3673
- /*[clinic end generated code: output=293045673fcd1a75 input=09e300416e3cd729 ]*/
3673
+ /*[clinic end generated code: output=293045673fcd1a75 input=e3f58030f538295d ]*/
3674
3674
{
3675
3675
#if defined(MS_WINDOWS ) && !defined(HAVE_OPENDIR )
3676
3676
return _listdir_windows_no_opendir (path , NULL );
@@ -10973,7 +10973,7 @@ os.getxattr
10973
10973
10974
10974
Return the value of extended attribute attribute on path.
10975
10975
10976
- path may be either a string or an open file descriptor.
10976
+ path may be either a string, a path-like object, or an open file descriptor.
10977
10977
If follow_symlinks is False, and the last element of the path is a symbolic
10978
10978
link, getxattr will examine the symbolic link itself instead of the file
10979
10979
the link points to.
@@ -10983,7 +10983,7 @@ If follow_symlinks is False, and the last element of the path is a symbolic
10983
10983
static PyObject *
10984
10984
os_getxattr_impl (PyObject * module , path_t * path , path_t * attribute ,
10985
10985
int follow_symlinks )
10986
- /*[clinic end generated code: output=5f2f44200a43cff2 input=8c8ea3bab78d89c2 ]*/
10986
+ /*[clinic end generated code: output=5f2f44200a43cff2 input=025789491708f7eb ]*/
10987
10987
{
10988
10988
Py_ssize_t i ;
10989
10989
PyObject * buffer = NULL ;
@@ -11045,7 +11045,7 @@ os.setxattr
11045
11045
11046
11046
Set extended attribute attribute on path to value.
11047
11047
11048
- path may be either a string or an open file descriptor.
11048
+ path may be either a string, a path-like object, or an open file descriptor.
11049
11049
If follow_symlinks is False, and the last element of the path is a symbolic
11050
11050
link, setxattr will modify the symbolic link itself instead of the file
11051
11051
the link points to.
@@ -11055,7 +11055,7 @@ If follow_symlinks is False, and the last element of the path is a symbolic
11055
11055
static PyObject *
11056
11056
os_setxattr_impl (PyObject * module , path_t * path , path_t * attribute ,
11057
11057
Py_buffer * value , int flags , int follow_symlinks )
11058
- /*[clinic end generated code: output=98b83f63fdde26bb input=f0d26833992015c2 ]*/
11058
+ /*[clinic end generated code: output=98b83f63fdde26bb input=c17c0103009042f0 ]*/
11059
11059
{
11060
11060
ssize_t result ;
11061
11061
@@ -11093,7 +11093,7 @@ os.removexattr
11093
11093
11094
11094
Remove extended attribute attribute on path.
11095
11095
11096
- path may be either a string or an open file descriptor.
11096
+ path may be either a string, a path-like object, or an open file descriptor.
11097
11097
If follow_symlinks is False, and the last element of the path is a symbolic
11098
11098
link, removexattr will modify the symbolic link itself instead of the file
11099
11099
the link points to.
@@ -11103,7 +11103,7 @@ If follow_symlinks is False, and the last element of the path is a symbolic
11103
11103
static PyObject *
11104
11104
os_removexattr_impl (PyObject * module , path_t * path , path_t * attribute ,
11105
11105
int follow_symlinks )
11106
- /*[clinic end generated code: output=521a51817980cda6 input=cdb54834161e3329 ]*/
11106
+ /*[clinic end generated code: output=521a51817980cda6 input=3d9a7d36fe2f7c4e ]*/
11107
11107
{
11108
11108
ssize_t result ;
11109
11109
@@ -11136,7 +11136,7 @@ os.listxattr
11136
11136
11137
11137
Return a list of extended attributes on path.
11138
11138
11139
- path may be either None, a string, or an open file descriptor.
11139
+ path may be either None, a string, a path-like object, or an open file descriptor.
11140
11140
if path is None, listxattr will examine the current directory.
11141
11141
If follow_symlinks is False, and the last element of the path is a symbolic
11142
11142
link, listxattr will examine the symbolic link itself instead of the file
@@ -11145,7 +11145,7 @@ If follow_symlinks is False, and the last element of the path is a symbolic
11145
11145
11146
11146
static PyObject *
11147
11147
os_listxattr_impl (PyObject * module , path_t * path , int follow_symlinks )
11148
- /*[clinic end generated code: output=bebdb4e2ad0ce435 input=08cca53ac0b07c13 ]*/
11148
+ /*[clinic end generated code: output=bebdb4e2ad0ce435 input=9826edf9fdb90869 ]*/
11149
11149
{
11150
11150
Py_ssize_t i ;
11151
11151
PyObject * result = NULL ;
@@ -12392,7 +12392,7 @@ os.scandir
12392
12392
12393
12393
Return an iterator of DirEntry objects for given path.
12394
12394
12395
- path can be specified as either str, bytes or path-like object. If path
12395
+ path can be specified as either str, bytes, or a path-like object. If path
12396
12396
is bytes, the names of yielded DirEntry objects will also be bytes; in
12397
12397
all other circumstances they will be str.
12398
12398
@@ -12401,7 +12401,7 @@ If path is None, uses the path='.'.
12401
12401
12402
12402
static PyObject *
12403
12403
os_scandir_impl (PyObject * module , path_t * path )
12404
- /*[clinic end generated code: output=6eb2668b675ca89e input=b139dc1c57f60846 ]*/
12404
+ /*[clinic end generated code: output=6eb2668b675ca89e input=6bdd312708fc3bb0 ]*/
12405
12405
{
12406
12406
ScandirIterator * iterator ;
12407
12407
#ifdef MS_WINDOWS
0 commit comments