From: Florimond Manca Date: Tue, 20 Aug 2019 11:27:58 +0000 (+0200) Subject: Turn concurrency.py into its own sub-package (#244) X-Git-Tag: 0.7.2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2397ff39d136ed84d07fa9b37e23603c6ea2b09;p=thirdparty%2Fhttpx.git Turn concurrency.py into its own sub-package (#244) --- diff --git a/httpx/__init__.py b/httpx/__init__.py index dec5cff1..c2925d5c 100644 --- a/httpx/__init__.py +++ b/httpx/__init__.py @@ -1,7 +1,7 @@ from .__version__ import __description__, __title__, __version__ from .api import delete, get, head, options, patch, post, put, request from .client import AsyncClient, Client -from .concurrency import AsyncioBackend +from .concurrency.asyncio import AsyncioBackend from .config import ( USER_AGENT, CertTypes, diff --git a/httpx/client.py b/httpx/client.py index fd86fb0c..ae75f15d 100644 --- a/httpx/client.py +++ b/httpx/client.py @@ -5,7 +5,7 @@ from types import TracebackType import hstspreload from .auth import HTTPBasicAuth -from .concurrency import AsyncioBackend +from .concurrency.asyncio import AsyncioBackend from .config import ( DEFAULT_MAX_REDIRECTS, DEFAULT_POOL_LIMITS, diff --git a/httpx/concurrency/__init__.py b/httpx/concurrency/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/httpx/concurrency.py b/httpx/concurrency/asyncio.py similarity index 98% rename from httpx/concurrency.py rename to httpx/concurrency/asyncio.py index f1bf5854..6c5dc0c4 100644 --- a/httpx/concurrency.py +++ b/httpx/concurrency/asyncio.py @@ -14,9 +14,9 @@ import ssl import typing from types import TracebackType -from .config import PoolLimits, TimeoutConfig -from .exceptions import ConnectTimeout, PoolTimeout, ReadTimeout, WriteTimeout -from .interfaces import ( +from ..config import PoolLimits, TimeoutConfig +from ..exceptions import ConnectTimeout, PoolTimeout, ReadTimeout, WriteTimeout +from ..interfaces import ( BaseBackgroundManager, BasePoolSemaphore, BaseReader, diff --git a/httpx/dispatch/connection.py b/httpx/dispatch/connection.py index b51fec68..9dda06d0 100644 --- a/httpx/dispatch/connection.py +++ b/httpx/dispatch/connection.py @@ -1,7 +1,7 @@ import functools import typing -from ..concurrency import AsyncioBackend +from ..concurrency.asyncio import AsyncioBackend from ..config import ( DEFAULT_TIMEOUT_CONFIG, CertTypes, diff --git a/httpx/dispatch/connection_pool.py b/httpx/dispatch/connection_pool.py index 3090a9a5..33dbd19e 100644 --- a/httpx/dispatch/connection_pool.py +++ b/httpx/dispatch/connection_pool.py @@ -1,6 +1,6 @@ import typing -from ..concurrency import AsyncioBackend +from ..concurrency.asyncio import AsyncioBackend from ..config import ( DEFAULT_POOL_LIMITS, DEFAULT_TIMEOUT_CONFIG, diff --git a/httpx/dispatch/http11.py b/httpx/dispatch/http11.py index 623ac1df..eff419a1 100644 --- a/httpx/dispatch/http11.py +++ b/httpx/dispatch/http11.py @@ -2,7 +2,7 @@ import typing import h11 -from ..concurrency import TimeoutFlag +from ..concurrency.asyncio import TimeoutFlag from ..config import TimeoutConfig, TimeoutTypes from ..interfaces import BaseReader, BaseWriter, ConcurrencyBackend from ..models import AsyncRequest, AsyncResponse diff --git a/httpx/dispatch/http2.py b/httpx/dispatch/http2.py index 980b07b2..f9325982 100644 --- a/httpx/dispatch/http2.py +++ b/httpx/dispatch/http2.py @@ -4,7 +4,7 @@ import typing import h2.connection import h2.events -from ..concurrency import TimeoutFlag +from ..concurrency.asyncio import TimeoutFlag from ..config import TimeoutConfig, TimeoutTypes from ..interfaces import BaseReader, BaseWriter, ConcurrencyBackend from ..models import AsyncRequest, AsyncResponse