mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
stdlib: Run stubdefaulter on Linux for 3.9 (#9663)
This commit is contained in:
@@ -107,14 +107,14 @@ if sys.platform != "win32":
|
||||
) -> Server: ...
|
||||
else:
|
||||
async def open_unix_connection(
|
||||
path: StrPath | None = ..., *, loop: events.AbstractEventLoop | None = ..., limit: int = ..., **kwds: Any
|
||||
path: StrPath | None = None, *, loop: events.AbstractEventLoop | None = None, limit: int = 65536, **kwds: Any
|
||||
) -> tuple[StreamReader, StreamWriter]: ...
|
||||
async def start_unix_server(
|
||||
client_connected_cb: _ClientConnectedCallback,
|
||||
path: StrPath | None = ...,
|
||||
path: StrPath | None = None,
|
||||
*,
|
||||
loop: events.AbstractEventLoop | None = ...,
|
||||
limit: int = ...,
|
||||
loop: events.AbstractEventLoop | None = None,
|
||||
limit: int = 65536,
|
||||
**kwds: Any,
|
||||
) -> Server: ...
|
||||
|
||||
|
||||
@@ -37,4 +37,4 @@ if sys.platform != "win32":
|
||||
# Don't exist at runtime
|
||||
__new__: None # type: ignore[assignment]
|
||||
__init__: None # type: ignore[assignment]
|
||||
def open(__filename: str, __flags: str = ..., __mode: int = ...) -> _gdbm: ...
|
||||
def open(__filename: str, __flags: str = "r", __mode: int = 438) -> _gdbm: ...
|
||||
|
||||
@@ -19,18 +19,18 @@ class Extension:
|
||||
self,
|
||||
name: str,
|
||||
sources: list[str],
|
||||
include_dirs: list[str] | None = ...,
|
||||
define_macros: list[tuple[str, str | None]] | None = ...,
|
||||
undef_macros: list[str] | None = ...,
|
||||
library_dirs: list[str] | None = ...,
|
||||
libraries: list[str] | None = ...,
|
||||
runtime_library_dirs: list[str] | None = ...,
|
||||
extra_objects: list[str] | None = ...,
|
||||
extra_compile_args: list[str] | None = ...,
|
||||
extra_link_args: list[str] | None = ...,
|
||||
export_symbols: list[str] | None = ...,
|
||||
swig_opts: list[str] | None = ...,
|
||||
depends: list[str] | None = ...,
|
||||
language: str | None = ...,
|
||||
optional: bool | None = ...,
|
||||
include_dirs: list[str] | None = None,
|
||||
define_macros: list[tuple[str, str | None]] | None = None,
|
||||
undef_macros: list[str] | None = None,
|
||||
library_dirs: list[str] | None = None,
|
||||
libraries: list[str] | None = None,
|
||||
runtime_library_dirs: list[str] | None = None,
|
||||
extra_objects: list[str] | None = None,
|
||||
extra_compile_args: list[str] | None = None,
|
||||
extra_link_args: list[str] | None = None,
|
||||
export_symbols: list[str] | None = None,
|
||||
swig_opts: list[str] | None = None,
|
||||
depends: list[str] | None = None,
|
||||
language: str | None = None,
|
||||
optional: bool | None = None,
|
||||
) -> None: ...
|
||||
|
||||
@@ -25,15 +25,18 @@ def byte_compile(
|
||||
) -> None: ...
|
||||
def rfc822_escape(header: str) -> str: ...
|
||||
def run_2to3(
|
||||
files: Iterable[str], fixer_names: Iterable[str] | None = ..., options: Mapping[str, Any] | None = ..., explicit: Unused = ...
|
||||
files: Iterable[str],
|
||||
fixer_names: Iterable[str] | None = None,
|
||||
options: Mapping[str, Any] | None = None,
|
||||
explicit: Unused = None,
|
||||
) -> None: ...
|
||||
def copydir_run_2to3(
|
||||
src: StrPath,
|
||||
dest: StrPath,
|
||||
template: str | None = ...,
|
||||
fixer_names: Iterable[str] | None = ...,
|
||||
options: Mapping[str, Any] | None = ...,
|
||||
explicit: Container[str] | None = ...,
|
||||
template: str | None = None,
|
||||
fixer_names: Iterable[str] | None = None,
|
||||
options: Mapping[str, Any] | None = None,
|
||||
explicit: Container[str] | None = None,
|
||||
) -> list[str]: ...
|
||||
|
||||
class Mixin2to3:
|
||||
|
||||
@@ -791,16 +791,16 @@ if sys.platform != "win32":
|
||||
dir_fd: int | None = None,
|
||||
) -> Iterator[tuple[bytes, list[bytes], list[bytes], int]]: ...
|
||||
if sys.platform == "linux":
|
||||
def getxattr(path: FileDescriptorOrPath, attribute: StrOrBytesPath, *, follow_symlinks: bool = ...) -> bytes: ...
|
||||
def listxattr(path: FileDescriptorOrPath | None = ..., *, follow_symlinks: bool = ...) -> list[str]: ...
|
||||
def removexattr(path: FileDescriptorOrPath, attribute: StrOrBytesPath, *, follow_symlinks: bool = ...) -> None: ...
|
||||
def getxattr(path: FileDescriptorOrPath, attribute: StrOrBytesPath, *, follow_symlinks: bool = True) -> bytes: ...
|
||||
def listxattr(path: FileDescriptorOrPath | None = None, *, follow_symlinks: bool = True) -> list[str]: ...
|
||||
def removexattr(path: FileDescriptorOrPath, attribute: StrOrBytesPath, *, follow_symlinks: bool = True) -> None: ...
|
||||
def setxattr(
|
||||
path: FileDescriptorOrPath,
|
||||
attribute: StrOrBytesPath,
|
||||
value: ReadableBuffer,
|
||||
flags: int = ...,
|
||||
flags: int = 0,
|
||||
*,
|
||||
follow_symlinks: bool = ...,
|
||||
follow_symlinks: bool = True,
|
||||
) -> None: ...
|
||||
|
||||
def abort() -> NoReturn: ...
|
||||
@@ -983,7 +983,7 @@ if sys.platform != "win32":
|
||||
def sysconf(__name: str | int) -> int: ...
|
||||
|
||||
if sys.platform == "linux":
|
||||
def getrandom(size: int, flags: int = ...) -> bytes: ...
|
||||
def getrandom(size: int, flags: int = 0) -> bytes: ...
|
||||
|
||||
def urandom(__size: int) -> bytes: ...
|
||||
|
||||
|
||||
@@ -109,9 +109,9 @@ if sys.platform == "linux":
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
self,
|
||||
__exc_type: type[BaseException] | None = ...,
|
||||
__exc_type: type[BaseException] | None = None,
|
||||
__exc_val: BaseException | None = ...,
|
||||
__exc_tb: TracebackType | None = ...,
|
||||
__exc_tb: TracebackType | None = None,
|
||||
) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
closed: bool
|
||||
@@ -119,7 +119,7 @@ if sys.platform == "linux":
|
||||
def register(self, fd: FileDescriptorLike, eventmask: int = ...) -> None: ...
|
||||
def modify(self, fd: FileDescriptorLike, eventmask: int) -> None: ...
|
||||
def unregister(self, fd: FileDescriptorLike) -> None: ...
|
||||
def poll(self, timeout: float | None = ..., maxevents: int = ...) -> list[tuple[int, int]]: ...
|
||||
def poll(self, timeout: float | None = None, maxevents: int = -1) -> list[tuple[int, int]]: ...
|
||||
@classmethod
|
||||
def fromfd(cls, __fd: FileDescriptorLike) -> epoll: ...
|
||||
EPOLLERR: int
|
||||
|
||||
@@ -47,9 +47,9 @@ if sys.platform != "win32":
|
||||
if sys.platform == "linux":
|
||||
class EpollSelector(BaseSelector):
|
||||
def fileno(self) -> int: ...
|
||||
def register(self, fileobj: FileDescriptorLike, events: _EventMask, data: Any = ...) -> SelectorKey: ...
|
||||
def register(self, fileobj: FileDescriptorLike, events: _EventMask, data: Any = None) -> SelectorKey: ...
|
||||
def unregister(self, fileobj: FileDescriptorLike) -> SelectorKey: ...
|
||||
def select(self, timeout: float | None = ...) -> list[tuple[SelectorKey, _EventMask]]: ...
|
||||
def select(self, timeout: float | None = None) -> list[tuple[SelectorKey, _EventMask]]: ...
|
||||
def get_map(self) -> Mapping[FileDescriptorLike, SelectorKey]: ...
|
||||
|
||||
class DevpollSelector(BaseSelector):
|
||||
|
||||
@@ -79,7 +79,7 @@ if sys.platform == "win32" or sys.platform == "darwin":
|
||||
def proxy_bypass(host: str) -> Any: ... # undocumented
|
||||
|
||||
else:
|
||||
def proxy_bypass(host: str, proxies: Mapping[str, str] | None = ...) -> Any: ... # undocumented
|
||||
def proxy_bypass(host: str, proxies: Mapping[str, str] | None = None) -> Any: ... # undocumented
|
||||
|
||||
class Request:
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user