@@ -2391,7 +2391,7 @@ class sched_param_converter(CConverter):
2391
2391
os.stat
2392
2392
2393
2393
path : path_t(allow_fd=True)
2394
- Path to be examined; can be string, bytes, path-like object or
2394
+ Path to be examined; can be string, bytes, a path-like object or
2395
2395
open-file-descriptor int.
2396
2396
2397
2397
*
@@ -2419,7 +2419,7 @@ It's an error to use dir_fd or follow_symlinks when specifying path as
2419
2419
2420
2420
static PyObject *
2421
2421
os_stat_impl (PyObject * module , path_t * path , int dir_fd , int follow_symlinks )
2422
- /*[clinic end generated code: output=7d4976e6f18a59c5 input=270bd64e7bb3c8f7 ]*/
2422
+ /*[clinic end generated code: output=7d4976e6f18a59c5 input=01d362ebcc06996b ]*/
2423
2423
{
2424
2424
return posix_do_stat ("stat" , path , dir_fd , follow_symlinks );
2425
2425
}
@@ -2453,7 +2453,7 @@ os_lstat_impl(PyObject *module, path_t *path, int dir_fd)
2453
2453
os.access -> bool
2454
2454
2455
2455
path: path_t
2456
- Path to be tested; can be string or bytes
2456
+ Path to be tested; can be string, bytes, or a path-like object.
2457
2457
2458
2458
mode: int
2459
2459
Operating-system mode bitfield. Can be F_OK to test existence,
@@ -2491,7 +2491,7 @@ Note that most operations will use the effective uid/gid, therefore this
2491
2491
static int
2492
2492
os_access_impl (PyObject * module , path_t * path , int mode , int dir_fd ,
2493
2493
int effective_ids , int follow_symlinks )
2494
- /*[clinic end generated code: output=cf84158bc90b1a77 input=8e8c3a6ba791fee3 ]*/
2494
+ /*[clinic end generated code: output=cf84158bc90b1a77 input=3ffe4e650ee3bf20 ]*/
2495
2495
{
2496
2496
int return_value ;
2497
2497
@@ -2683,7 +2683,7 @@ os_fchdir_impl(PyObject *module, int fd)
2683
2683
os.chmod
2684
2684
2685
2685
path: path_t(allow_fd='PATH_HAVE_FCHMOD')
2686
- Path to be modified. May always be specified as a str or bytes .
2686
+ Path to be modified. May always be specified as a str, bytes, or a path-like object .
2687
2687
On some platforms, path may also be specified as an open file descriptor.
2688
2688
If this functionality is unavailable, using it raises an exception.
2689
2689
@@ -2714,7 +2714,7 @@ dir_fd and follow_symlinks may not be implemented on your platform.
2714
2714
static PyObject *
2715
2715
os_chmod_impl (PyObject * module , path_t * path , int mode , int dir_fd ,
2716
2716
int follow_symlinks )
2717
- /*[clinic end generated code: output=5cf6a94915cc7bff input=7f1618e5e15cc196 ]*/
2717
+ /*[clinic end generated code: output=5cf6a94915cc7bff input=989081551c00293b ]*/
2718
2718
{
2719
2719
int result ;
2720
2720
@@ -3034,7 +3034,7 @@ os_fdatasync_impl(PyObject *module, int fd)
3034
3034
os.chown
3035
3035
3036
3036
path : path_t(allow_fd='PATH_HAVE_FCHOWN')
3037
- Path to be examined; can be string, bytes, or open-file-descriptor int.
3037
+ Path to be examined; can be string, bytes, a path-like object, or open-file-descriptor int.
3038
3038
3039
3039
uid: uid_t
3040
3040
@@ -3072,7 +3072,7 @@ dir_fd and follow_symlinks may not be implemented on your platform.
3072
3072
static PyObject *
3073
3073
os_chown_impl (PyObject * module , path_t * path , uid_t uid , gid_t gid ,
3074
3074
int dir_fd , int follow_symlinks )
3075
- /*[clinic end generated code: output=4beadab0db5f70cd input=a61cc35574814d5d ]*/
3075
+ /*[clinic end generated code: output=4beadab0db5f70cd input=b08c5ec67996a97d ]*/
3076
3076
{
3077
3077
int result ;
3078
3078
@@ -3599,7 +3599,7 @@ os.listdir
3599
3599
3600
3600
Return a list containing the names of the files in the directory.
3601
3601
3602
- path can be specified as either str or bytes . If path is bytes,
3602
+ path can be specified as either str, bytes, or a path-like object . If path is bytes,
3603
3603
the filenames returned will also be bytes; in all other circumstances
3604
3604
the filenames returned will be str.
3605
3605
If path is None, uses the path='.'.
@@ -3615,7 +3615,7 @@ entries '.' and '..' even if they are present in the directory.
3615
3615
3616
3616
static PyObject *
3617
3617
os_listdir_impl (PyObject * module , path_t * path )
3618
- /*[clinic end generated code: output=293045673fcd1a75 input=09e300416e3cd729 ]*/
3618
+ /*[clinic end generated code: output=293045673fcd1a75 input=e3f58030f538295d ]*/
3619
3619
{
3620
3620
#if defined(MS_WINDOWS ) && !defined(HAVE_OPENDIR )
3621
3621
return _listdir_windows_no_opendir (path , NULL );
@@ -10667,7 +10667,7 @@ os.getxattr
10667
10667
10668
10668
Return the value of extended attribute attribute on path.
10669
10669
10670
- path may be either a string or an open file descriptor.
10670
+ path may be either a string, a path-like object, or an open file descriptor.
10671
10671
If follow_symlinks is False, and the last element of the path is a symbolic
10672
10672
link, getxattr will examine the symbolic link itself instead of the file
10673
10673
the link points to.
@@ -10677,7 +10677,7 @@ If follow_symlinks is False, and the last element of the path is a symbolic
10677
10677
static PyObject *
10678
10678
os_getxattr_impl (PyObject * module , path_t * path , path_t * attribute ,
10679
10679
int follow_symlinks )
10680
- /*[clinic end generated code: output=5f2f44200a43cff2 input=8c8ea3bab78d89c2 ]*/
10680
+ /*[clinic end generated code: output=5f2f44200a43cff2 input=025789491708f7eb ]*/
10681
10681
{
10682
10682
Py_ssize_t i ;
10683
10683
PyObject * buffer = NULL ;
@@ -10739,7 +10739,7 @@ os.setxattr
10739
10739
10740
10740
Set extended attribute attribute on path to value.
10741
10741
10742
- path may be either a string or an open file descriptor.
10742
+ path may be either a string, a path-like object, or an open file descriptor.
10743
10743
If follow_symlinks is False, and the last element of the path is a symbolic
10744
10744
link, setxattr will modify the symbolic link itself instead of the file
10745
10745
the link points to.
@@ -10749,7 +10749,7 @@ If follow_symlinks is False, and the last element of the path is a symbolic
10749
10749
static PyObject *
10750
10750
os_setxattr_impl (PyObject * module , path_t * path , path_t * attribute ,
10751
10751
Py_buffer * value , int flags , int follow_symlinks )
10752
- /*[clinic end generated code: output=98b83f63fdde26bb input=f0d26833992015c2 ]*/
10752
+ /*[clinic end generated code: output=98b83f63fdde26bb input=c17c0103009042f0 ]*/
10753
10753
{
10754
10754
ssize_t result ;
10755
10755
@@ -10787,7 +10787,7 @@ os.removexattr
10787
10787
10788
10788
Remove extended attribute attribute on path.
10789
10789
10790
- path may be either a string or an open file descriptor.
10790
+ path may be either a string, a path-like object, or an open file descriptor.
10791
10791
If follow_symlinks is False, and the last element of the path is a symbolic
10792
10792
link, removexattr will modify the symbolic link itself instead of the file
10793
10793
the link points to.
@@ -10797,7 +10797,7 @@ If follow_symlinks is False, and the last element of the path is a symbolic
10797
10797
static PyObject *
10798
10798
os_removexattr_impl (PyObject * module , path_t * path , path_t * attribute ,
10799
10799
int follow_symlinks )
10800
- /*[clinic end generated code: output=521a51817980cda6 input=cdb54834161e3329 ]*/
10800
+ /*[clinic end generated code: output=521a51817980cda6 input=3d9a7d36fe2f7c4e ]*/
10801
10801
{
10802
10802
ssize_t result ;
10803
10803
@@ -10830,7 +10830,7 @@ os.listxattr
10830
10830
10831
10831
Return a list of extended attributes on path.
10832
10832
10833
- path may be either None, a string, or an open file descriptor.
10833
+ path may be either None, a string, a path-like object, or an open file descriptor.
10834
10834
if path is None, listxattr will examine the current directory.
10835
10835
If follow_symlinks is False, and the last element of the path is a symbolic
10836
10836
link, listxattr will examine the symbolic link itself instead of the file
@@ -10839,7 +10839,7 @@ If follow_symlinks is False, and the last element of the path is a symbolic
10839
10839
10840
10840
static PyObject *
10841
10841
os_listxattr_impl (PyObject * module , path_t * path , int follow_symlinks )
10842
- /*[clinic end generated code: output=bebdb4e2ad0ce435 input=08cca53ac0b07c13 ]*/
10842
+ /*[clinic end generated code: output=bebdb4e2ad0ce435 input=9826edf9fdb90869 ]*/
10843
10843
{
10844
10844
Py_ssize_t i ;
10845
10845
PyObject * result = NULL ;
0 commit comments