mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-22 03:41:28 +08:00
Add fchmod and lchmod for Windows on 3.13 (#12662)
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
# New in py313 (triage these!)
|
||||
nt.fchmod
|
||||
nt.lchmod
|
||||
ntpath.exists
|
||||
ntpath.lexists
|
||||
ntpath.splitroot
|
||||
os.fchmod
|
||||
os.lchmod
|
||||
os.path.exists
|
||||
os.path.lexists
|
||||
|
||||
|
||||
@@ -107,5 +107,7 @@ if sys.platform == "win32":
|
||||
listvolumes as listvolumes,
|
||||
set_blocking as set_blocking,
|
||||
)
|
||||
if sys.version_info >= (3, 13):
|
||||
from os import fchmod as fchmod, lchmod as lchmod
|
||||
|
||||
environ: dict[str, str]
|
||||
|
||||
@@ -673,7 +673,6 @@ if sys.version_info >= (3, 12) or sys.platform != "win32":
|
||||
def set_blocking(fd: int, blocking: bool, /) -> None: ...
|
||||
|
||||
if sys.platform != "win32":
|
||||
def fchmod(fd: int, mode: int) -> None: ...
|
||||
def fchown(fd: int, uid: int, gid: int) -> None: ...
|
||||
def fpathconf(fd: int, name: str | int, /) -> int: ...
|
||||
def fstatvfs(fd: int, /) -> statvfs_result: ...
|
||||
@@ -754,7 +753,6 @@ def chmod(path: FileDescriptorOrPath, mode: int, *, dir_fd: int | None = None, f
|
||||
if sys.platform != "win32" and sys.platform != "linux":
|
||||
def chflags(path: StrOrBytesPath, flags: int, follow_symlinks: bool = True) -> None: ... # some flavors of Unix
|
||||
def lchflags(path: StrOrBytesPath, flags: int) -> None: ...
|
||||
def lchmod(path: StrOrBytesPath, mode: int) -> None: ...
|
||||
|
||||
if sys.platform != "win32":
|
||||
def chroot(path: StrOrBytesPath) -> None: ...
|
||||
@@ -1179,3 +1177,12 @@ if sys.version_info >= (3, 13) and sys.platform == "linux":
|
||||
def timerfd_settime_ns(fd: FileDescriptor, /, *, flags: int = 0, initial: int = 0, interval: int = 0) -> tuple[int, int]: ...
|
||||
def timerfd_gettime(fd: FileDescriptor, /) -> tuple[float, float]: ...
|
||||
def timerfd_gettime_ns(fd: FileDescriptor, /) -> tuple[int, int]: ...
|
||||
|
||||
if sys.version_info >= (3, 13) or sys.platform != "win32":
|
||||
# Added to Windows in 3.13.
|
||||
def fchmod(fd: int, mode: int) -> None: ...
|
||||
|
||||
if sys.platform != "linux":
|
||||
if sys.version_info >= (3, 13) or sys.platform != "win32":
|
||||
# Added to Windows in 3.13.
|
||||
def lchmod(path: StrOrBytesPath, mode: int) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user