mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Various py311 removals (#7836)
This commit is contained in:
@@ -123,7 +123,6 @@ class SSLProtocol(protocols.Protocol):
|
||||
def connection_lost(self, exc: BaseException | None) -> None: ...
|
||||
def pause_writing(self) -> None: ...
|
||||
def resume_writing(self) -> None: ...
|
||||
def data_received(self, data: bytes) -> None: ...
|
||||
def eof_received(self) -> None: ...
|
||||
def _get_extra_info(self, name: str, default: Any | None = ...) -> Any: ...
|
||||
def _start_shutdown(self) -> None: ...
|
||||
@@ -133,7 +132,9 @@ class SSLProtocol(protocols.Protocol):
|
||||
def _check_handshake_timeout(self) -> None: ...
|
||||
|
||||
def _on_handshake_complete(self, handshake_exc: BaseException | None) -> None: ...
|
||||
def _process_write_backlog(self) -> None: ...
|
||||
def _fatal_error(self, exc: BaseException, message: str = ...) -> None: ...
|
||||
def _finalize(self) -> None: ...
|
||||
def _abort(self) -> None: ...
|
||||
if sys.version_info < (3, 11):
|
||||
def _finalize(self) -> None: ...
|
||||
def _process_write_backlog(self) -> None: ...
|
||||
def data_received(self, data: bytes) -> None: ...
|
||||
|
||||
@@ -14,7 +14,6 @@ _CMSG: TypeAlias = tuple[int, int, bytes]
|
||||
|
||||
class TransportSocket:
|
||||
def __init__(self, sock: socket.socket) -> None: ...
|
||||
def _na(self, what: str) -> None: ...
|
||||
@property
|
||||
def family(self) -> int: ...
|
||||
@property
|
||||
@@ -41,6 +40,7 @@ class TransportSocket:
|
||||
def gettimeout(self) -> float | None: ...
|
||||
def setblocking(self, flag: bool) -> None: ...
|
||||
if sys.version_info < (3, 11):
|
||||
def _na(self, what: str) -> None: ...
|
||||
def accept(self) -> tuple[socket.socket, _RetAddress]: ...
|
||||
def connect(self, address: _Address | bytes) -> None: ...
|
||||
def connect_ex(self, address: _Address | bytes) -> int: ...
|
||||
|
||||
@@ -78,9 +78,7 @@ class NullTranslations:
|
||||
def _parse(self, fp: _TranslationsReader) -> None: ...
|
||||
def add_fallback(self, fallback: NullTranslations) -> None: ...
|
||||
def gettext(self, message: str) -> str: ...
|
||||
def lgettext(self, message: str) -> str: ...
|
||||
def ngettext(self, msgid1: str, msgid2: str, n: int) -> str: ...
|
||||
def lngettext(self, msgid1: str, msgid2: str, n: int) -> str: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def pgettext(self, context: str, message: str) -> str: ...
|
||||
def npgettext(self, context: str, msgid1: str, msgid2: str, n: int) -> str: ...
|
||||
@@ -90,6 +88,8 @@ class NullTranslations:
|
||||
if sys.version_info < (3, 11):
|
||||
def output_charset(self) -> str | None: ...
|
||||
def set_output_charset(self, charset: str) -> None: ...
|
||||
def lgettext(self, message: str) -> str: ...
|
||||
def lngettext(self, msgid1: str, msgid2: str, n: int) -> str: ...
|
||||
|
||||
def install(self, names: Container[str] | None = ...) -> None: ...
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
from collections.abc import Iterator
|
||||
from typing import Any, Protocol, TypeVar
|
||||
|
||||
@@ -14,6 +15,9 @@ class PackageMetadata(Protocol):
|
||||
|
||||
class SimplePath(Protocol):
|
||||
def joinpath(self) -> SimplePath: ...
|
||||
def __div__(self) -> SimplePath: ...
|
||||
def parent(self) -> SimplePath: ...
|
||||
def read_text(self) -> str: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
def __truediv__(self) -> SimplePath: ...
|
||||
else:
|
||||
def __div__(self) -> SimplePath: ...
|
||||
|
||||
@@ -3,12 +3,13 @@ from collections.abc import Container, Iterable, Iterator, Sequence
|
||||
from types import CodeType
|
||||
from typing import IO, Any
|
||||
|
||||
LOAD_CONST: int # undocumented
|
||||
IMPORT_NAME: int # undocumented
|
||||
STORE_NAME: int # undocumented
|
||||
STORE_GLOBAL: int # undocumented
|
||||
STORE_OPS: tuple[int, int] # undocumented
|
||||
EXTENDED_ARG: int # undocumented
|
||||
if sys.version_info < (3, 11):
|
||||
LOAD_CONST: int # undocumented
|
||||
IMPORT_NAME: int # undocumented
|
||||
STORE_NAME: int # undocumented
|
||||
STORE_GLOBAL: int # undocumented
|
||||
STORE_OPS: tuple[int, int] # undocumented
|
||||
EXTENDED_ARG: int # undocumented
|
||||
|
||||
packagePathMap: dict[str, list[str]] # undocumented
|
||||
|
||||
|
||||
@@ -74,7 +74,9 @@ class Pdb(Bdb, Cmd):
|
||||
def print_stack_trace(self) -> None: ...
|
||||
def print_stack_entry(self, frame_lineno: tuple[FrameType, int], prompt_prefix: str = ...) -> None: ...
|
||||
def lookupmodule(self, filename: str) -> str | None: ...
|
||||
def _runscript(self, filename: str) -> None: ...
|
||||
if sys.version_info < (3, 11):
|
||||
def _runscript(self, filename: str) -> None: ...
|
||||
|
||||
def do_commands(self, arg: str) -> bool | None: ...
|
||||
def do_break(self, arg: str, temporary: bool = ...) -> bool | None: ...
|
||||
def do_tbreak(self, arg: str) -> bool | None: ...
|
||||
@@ -165,7 +167,7 @@ class Pdb(Bdb, Cmd):
|
||||
complete_whatis = _complete_expression
|
||||
complete_display = _complete_expression
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
if sys.version_info >= (3, 7) and sys.version_info < (3, 11):
|
||||
def _runmodule(self, module_name: str) -> None: ...
|
||||
|
||||
# undocumented
|
||||
|
||||
@@ -39,7 +39,8 @@ non_hierarchical: list[str]
|
||||
uses_query: list[str]
|
||||
uses_fragment: list[str]
|
||||
scheme_chars: str
|
||||
MAX_CACHE_SIZE: int
|
||||
if sys.version_info < (3, 11):
|
||||
MAX_CACHE_SIZE: int
|
||||
|
||||
class _ResultMixinBase(Generic[AnyStr]):
|
||||
def geturl(self) -> AnyStr: ...
|
||||
|
||||
Reference in New Issue
Block a user