Move some protocol definitions closer to their usage sites (#8436)

This commit is contained in:
Alex Waygood authored and GitHub committed 2022-07-29 06:26:27 -07:00
1 parent aba4bbd13b
commit 553700e355
4 files changed
+17 -20

No files matched your search

+1 -13
View File
@@ -5,7 +5,7 @@ import types
from _typeshed import Self, WriteableBuffer
from collections.abc import Callable, Iterable, Iterator, Mapping
from socket import socket
from typing import IO, Any, BinaryIO, Protocol, TypeVar, overload
from typing import IO, Any, BinaryIO, TypeVar, overload
from typing_extensions import TypeAlias
__all__ = [
@@ -137,18 +137,6 @@ class HTTPResponse(io.BufferedIOBase, BinaryIO):
def getcode(self) -> int: ...
def begin(self) -> None: ...
# This is an API stub only for the class below, not a class itself.
# urllib.request uses it for a parameter.
class _HTTPConnectionProtocol(Protocol):
def __call__(
self,
host: str,
port: int | None = ...,
timeout: float = ...,
source_address: tuple[str, int] | None = ...,
blocksize: int = ...,
) -> HTTPConnection: ...
class HTTPConnection:
auto_open: int # undocumented
debuglevel: int