]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Make timeout parameter None-able & cleanup __all__. (#704)
authorJoe <10510431+j178@users.noreply.github.com>
Wed, 1 Jan 2020 13:45:38 +0000 (21:45 +0800)
committerTom Christie <tom@tomchristie.com>
Wed, 1 Jan 2020 13:45:38 +0000 (13:45 +0000)
* Timeout type annotation includes `None`.
* Cleanup `__all__` exports.

httpx/__init__.py
httpx/config.py
httpx/models.py

index 61346d0e63b02bbc350584aa7fd7f3ac2460fc68..caaa81a901f7b2cd3f238b03f09b63fd545885e3 100644 (file)
@@ -71,8 +71,6 @@ __all__ = [
     "ProxyError",
     "TooManyRedirects",
     "WriteTimeout",
-    "BaseSocketStream",
-    "ConcurrencyBackend",
     "URL",
     "StatusCode",
     "Cookies",
index 86fb4434fba7d97289cf1448ee3c0ca35e8e4766..0e837a232f534673f5f7bf5017be5b51b4e4e9d7 100644 (file)
@@ -10,7 +10,9 @@ from .utils import get_ca_bundle_from_env, get_logger
 
 CertTypes = typing.Union[str, typing.Tuple[str, str], typing.Tuple[str, str, str]]
 VerifyTypes = typing.Union[str, bool, ssl.SSLContext]
-TimeoutTypes = typing.Union[float, typing.Tuple[float, float, float, float], "Timeout"]
+TimeoutTypes = typing.Union[
+    None, float, typing.Tuple[float, float, float, float], "Timeout"
+]
 
 
 USER_AGENT = f"python-httpx/{__version__}"
index fe42e3c26665ae34874345e4c705ce8754f0ba1b..401bf49a803a5d114aeed72612be931640ae2bf3 100644 (file)
@@ -46,7 +46,6 @@ from .utils import (
 )
 
 if typing.TYPE_CHECKING:  # pragma: no cover
-    from .middleware.base import BaseMiddleware  # noqa: F401
     from .dispatch.base import Dispatcher  # noqa: F401
 
 PrimitiveData = typing.Optional[typing.Union[str, int, float, bool]]