@@ -2480,7 +2480,7 @@ class sched_param_converter(CConverter):
2480
2480
os.stat
2481
2481
2482
2482
path : path_t(allow_fd=True)
2483
- Path to be examined; can be string, bytes, path-like object or
2483
+ Path to be examined; can be string, bytes, a path-like object or
2484
2484
open-file-descriptor int.
2485
2485
2486
2486
*
@@ -2508,7 +2508,7 @@ It's an error to use dir_fd or follow_symlinks when specifying path as
2508
2508
2509
2509
static PyObject *
2510
2510
os_stat_impl (PyObject * module , path_t * path , int dir_fd , int follow_symlinks )
2511
- /*[clinic end generated code: output=7d4976e6f18a59c5 input=270bd64e7bb3c8f7 ]*/
2511
+ /*[clinic end generated code: output=7d4976e6f18a59c5 input=01d362ebcc06996b ]*/
2512
2512
{
2513
2513
return posix_do_stat ("stat" , path , dir_fd , follow_symlinks );
2514
2514
}
@@ -2542,7 +2542,7 @@ os_lstat_impl(PyObject *module, path_t *path, int dir_fd)
2542
2542
os.access -> bool
2543
2543
2544
2544
path: path_t
2545
- Path to be tested; can be string or bytes
2545
+ Path to be tested; can be string, bytes, or a path-like object.
2546
2546
2547
2547
mode: int
2548
2548
Operating-system mode bitfield. Can be F_OK to test existence,
@@ -2580,7 +2580,7 @@ Note that most operations will use the effective uid/gid, therefore this
2580
2580
static int
2581
2581
os_access_impl (PyObject * module , path_t * path , int mode , int dir_fd ,
2582
2582
int effective_ids , int follow_symlinks )
2583
- /*[clinic end generated code: output=cf84158bc90b1a77 input=8e8c3a6ba791fee3 ]*/
2583
+ /*[clinic end generated code: output=cf84158bc90b1a77 input=3ffe4e650ee3bf20 ]*/
2584
2584
{
2585
2585
int return_value ;
2586
2586
@@ -2772,7 +2772,7 @@ os_fchdir_impl(PyObject *module, int fd)
2772
2772
os.chmod
2773
2773
2774
2774
path: path_t(allow_fd='PATH_HAVE_FCHMOD')
2775
- Path to be modified. May always be specified as a str or bytes .
2775
+ Path to be modified. May always be specified as a str, bytes, or a path-like object .
2776
2776
On some platforms, path may also be specified as an open file descriptor.
2777
2777
If this functionality is unavailable, using it raises an exception.
2778
2778
@@ -2803,7 +2803,7 @@ dir_fd and follow_symlinks may not be implemented on your platform.
2803
2803
static PyObject *
2804
2804
os_chmod_impl (PyObject * module , path_t * path , int mode , int dir_fd ,
2805
2805
int follow_symlinks )
2806
- /*[clinic end generated code: output=5cf6a94915cc7bff input=7f1618e5e15cc196 ]*/
2806
+ /*[clinic end generated code: output=5cf6a94915cc7bff input=989081551c00293b ]*/
2807
2807
{
2808
2808
int result ;
2809
2809
@@ -3123,7 +3123,7 @@ os_fdatasync_impl(PyObject *module, int fd)
3123
3123
os.chown
3124
3124
3125
3125
path : path_t(allow_fd='PATH_HAVE_FCHOWN')
3126
- Path to be examined; can be string, bytes, or open-file-descriptor int.
3126
+ Path to be examined; can be string, bytes, a path-like object, or open-file-descriptor int.
3127
3127
3128
3128
uid: uid_t
3129
3129
@@ -3161,7 +3161,7 @@ dir_fd and follow_symlinks may not be implemented on your platform.
3161
3161
static PyObject *
3162
3162
os_chown_impl (PyObject * module , path_t * path , uid_t uid , gid_t gid ,
3163
3163
int dir_fd , int follow_symlinks )
3164
- /*[clinic end generated code: output=4beadab0db5f70cd input=a61cc35574814d5d ]*/
3164
+ /*[clinic end generated code: output=4beadab0db5f70cd input=b08c5ec67996a97d ]*/
3165
3165
{
3166
3166
int result ;
3167
3167
@@ -3688,7 +3688,7 @@ os.listdir
3688
3688
3689
3689
Return a list containing the names of the files in the directory.
3690
3690
3691
- path can be specified as either str or bytes . If path is bytes,
3691
+ path can be specified as either str, bytes, or a path-like object . If path is bytes,
3692
3692
the filenames returned will also be bytes; in all other circumstances
3693
3693
the filenames returned will be str.
3694
3694
If path is None, uses the path='.'.
@@ -3704,7 +3704,7 @@ entries '.' and '..' even if they are present in the directory.
3704
3704
3705
3705
static PyObject *
3706
3706
os_listdir_impl (PyObject * module , path_t * path )
3707
- /*[clinic end generated code: output=293045673fcd1a75 input=09e300416e3cd729 ]*/
3707
+ /*[clinic end generated code: output=293045673fcd1a75 input=e3f58030f538295d ]*/
3708
3708
{
3709
3709
#if defined(MS_WINDOWS ) && !defined(HAVE_OPENDIR )
3710
3710
return _listdir_windows_no_opendir (path , NULL );
@@ -11415,7 +11415,7 @@ os.getxattr
11415
11415
11416
11416
Return the value of extended attribute attribute on path.
11417
11417
11418
- path may be either a string or an open file descriptor.
11418
+ path may be either a string, a path-like object, or an open file descriptor.
11419
11419
If follow_symlinks is False, and the last element of the path is a symbolic
11420
11420
link, getxattr will examine the symbolic link itself instead of the file
11421
11421
the link points to.
@@ -11425,7 +11425,7 @@ If follow_symlinks is False, and the last element of the path is a symbolic
11425
11425
static PyObject *
11426
11426
os_getxattr_impl (PyObject * module , path_t * path , path_t * attribute ,
11427
11427
int follow_symlinks )
11428
- /*[clinic end generated code: output=5f2f44200a43cff2 input=8c8ea3bab78d89c2 ]*/
11428
+ /*[clinic end generated code: output=5f2f44200a43cff2 input=025789491708f7eb ]*/
11429
11429
{
11430
11430
Py_ssize_t i ;
11431
11431
PyObject * buffer = NULL ;
@@ -11487,7 +11487,7 @@ os.setxattr
11487
11487
11488
11488
Set extended attribute attribute on path to value.
11489
11489
11490
- path may be either a string or an open file descriptor.
11490
+ path may be either a string, a path-like object, or an open file descriptor.
11491
11491
If follow_symlinks is False, and the last element of the path is a symbolic
11492
11492
link, setxattr will modify the symbolic link itself instead of the file
11493
11493
the link points to.
@@ -11497,7 +11497,7 @@ If follow_symlinks is False, and the last element of the path is a symbolic
11497
11497
static PyObject *
11498
11498
os_setxattr_impl (PyObject * module , path_t * path , path_t * attribute ,
11499
11499
Py_buffer * value , int flags , int follow_symlinks )
11500
- /*[clinic end generated code: output=98b83f63fdde26bb input=f0d26833992015c2 ]*/
11500
+ /*[clinic end generated code: output=98b83f63fdde26bb input=c17c0103009042f0 ]*/
11501
11501
{
11502
11502
ssize_t result ;
11503
11503
@@ -11535,7 +11535,7 @@ os.removexattr
11535
11535
11536
11536
Remove extended attribute attribute on path.
11537
11537
11538
- path may be either a string or an open file descriptor.
11538
+ path may be either a string, a path-like object, or an open file descriptor.
11539
11539
If follow_symlinks is False, and the last element of the path is a symbolic
11540
11540
link, removexattr will modify the symbolic link itself instead of the file
11541
11541
the link points to.
@@ -11545,7 +11545,7 @@ If follow_symlinks is False, and the last element of the path is a symbolic
11545
11545
static PyObject *
11546
11546
os_removexattr_impl (PyObject * module , path_t * path , path_t * attribute ,
11547
11547
int follow_symlinks )
11548
- /*[clinic end generated code: output=521a51817980cda6 input=cdb54834161e3329 ]*/
11548
+ /*[clinic end generated code: output=521a51817980cda6 input=3d9a7d36fe2f7c4e ]*/
11549
11549
{
11550
11550
ssize_t result ;
11551
11551
@@ -11578,7 +11578,7 @@ os.listxattr
11578
11578
11579
11579
Return a list of extended attributes on path.
11580
11580
11581
- path may be either None, a string, or an open file descriptor.
11581
+ path may be either None, a string, a path-like object, or an open file descriptor.
11582
11582
if path is None, listxattr will examine the current directory.
11583
11583
If follow_symlinks is False, and the last element of the path is a symbolic
11584
11584
link, listxattr will examine the symbolic link itself instead of the file
@@ -11587,7 +11587,7 @@ If follow_symlinks is False, and the last element of the path is a symbolic
11587
11587
11588
11588
static PyObject *
11589
11589
os_listxattr_impl (PyObject * module , path_t * path , int follow_symlinks )
11590
- /*[clinic end generated code: output=bebdb4e2ad0ce435 input=08cca53ac0b07c13 ]*/
11590
+ /*[clinic end generated code: output=bebdb4e2ad0ce435 input=9826edf9fdb90869 ]*/
11591
11591
{
11592
11592
Py_ssize_t i ;
11593
11593
PyObject * result = NULL ;
@@ -12836,7 +12836,7 @@ os.scandir
12836
12836
12837
12837
Return an iterator of DirEntry objects for given path.
12838
12838
12839
- path can be specified as either str, bytes or path-like object. If path
12839
+ path can be specified as either str, bytes, or a path-like object. If path
12840
12840
is bytes, the names of yielded DirEntry objects will also be bytes; in
12841
12841
all other circumstances they will be str.
12842
12842
@@ -12845,7 +12845,7 @@ If path is None, uses the path='.'.
12845
12845
12846
12846
static PyObject *
12847
12847
os_scandir_impl (PyObject * module , path_t * path )
12848
- /*[clinic end generated code: output=6eb2668b675ca89e input=b139dc1c57f60846 ]*/
12848
+ /*[clinic end generated code: output=6eb2668b675ca89e input=6bdd312708fc3bb0 ]*/
12849
12849
{
12850
12850
ScandirIterator * iterator ;
12851
12851
#ifdef MS_WINDOWS
0 commit comments