mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Move some protocol definitions closer to their usage sites (#8436)
This commit is contained in:
@@ -3,10 +3,10 @@ import sys
|
||||
from _typeshed import StrOrBytesPath, SupportsRead
|
||||
from collections.abc import Callable, Iterable, Mapping, MutableMapping, Sequence
|
||||
from email.message import Message
|
||||
from http.client import HTTPMessage, HTTPResponse, _HTTPConnectionProtocol
|
||||
from http.client import HTTPConnection, HTTPMessage, HTTPResponse
|
||||
from http.cookiejar import CookieJar
|
||||
from re import Pattern
|
||||
from typing import IO, Any, ClassVar, NoReturn, TypeVar, overload
|
||||
from typing import IO, Any, ClassVar, NoReturn, Protocol, TypeVar, overload
|
||||
from typing_extensions import TypeAlias
|
||||
from urllib.error import HTTPError as HTTPError
|
||||
from urllib.response import addclosehook, addinfourl
|
||||
@@ -224,6 +224,16 @@ class ProxyDigestAuthHandler(BaseHandler, AbstractDigestAuthHandler):
|
||||
auth_header: ClassVar[str] # undocumented
|
||||
def http_error_407(self, req: Request, fp: IO[bytes], code: int, msg: str, headers: HTTPMessage) -> _UrlopenRet | None: ...
|
||||
|
||||
class _HTTPConnectionProtocol(Protocol):
|
||||
def __call__(
|
||||
self,
|
||||
host: str,
|
||||
port: int | None = ...,
|
||||
timeout: float = ...,
|
||||
source_address: tuple[str, int] | None = ...,
|
||||
blocksize: int = ...,
|
||||
) -> HTTPConnection: ...
|
||||
|
||||
class AbstractHTTPHandler(BaseHandler): # undocumented
|
||||
def __init__(self, debuglevel: int = ...) -> None: ...
|
||||
def set_http_debuglevel(self, level: int) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user