Fix stubtest errors on macOS / Python 3.11 (#8743)

This commit is contained in:
Alex Waygood
2022-09-15 23:27:42 +01:00
committed by GitHub
parent 5a3595a5d6
commit 20bc8fa4e3
4 changed files with 18 additions and 13 deletions

View File

@@ -607,7 +607,6 @@ def pipe() -> tuple[int, int]: ...
def read(__fd: int, __length: int) -> bytes: ...
if sys.platform != "win32":
# Unix only
def fchmod(fd: int, mode: int) -> None: ...
def fchown(fd: int, uid: int, gid: int) -> None: ...
def fpathconf(__fd: int, __name: str | int) -> int: ...
@@ -624,11 +623,12 @@ if sys.platform != "win32":
def pread(__fd: int, __length: int, __offset: int) -> bytes: ...
def pwrite(__fd: int, __buffer: bytes, __offset: int) -> int: ...
# In CI, stubtest sometimes reports that these are available on MacOS, sometimes not
def preadv(__fd: int, __buffers: SupportsLenAndGetItem[WriteableBuffer], __offset: int, __flags: int = ...) -> int: ...
def pwritev(__fd: int, __buffers: SupportsLenAndGetItem[ReadableBuffer], __offset: int, __flags: int = ...) -> int: ...
if sys.platform != "darwin":
if sys.version_info >= (3, 10):
RWF_APPEND: int # docs say available on 3.7+, stubtest says otherwise
def preadv(__fd: int, __buffers: SupportsLenAndGetItem[WriteableBuffer], __offset: int, __flags: int = ...) -> int: ...
def pwritev(__fd: int, __buffers: SupportsLenAndGetItem[ReadableBuffer], __offset: int, __flags: int = ...) -> int: ...
RWF_DSYNC: int
RWF_SYNC: int
RWF_HIPRI: int