diff --git a/httpx/__init__.py b/httpx/__init__.py index dec5cff19c..c2925d5c81 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 fd86fb0c83..ae75f15da8 100644 --- a/httpx/client.py +++ b/httpx/client.py @@ -5,7 +5,7 @@ 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 0000000000..e69de29bb2 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 f1bf585448..6c5dc0c481 100644 --- a/httpx/concurrency.py +++ b/httpx/concurrency/asyncio.py @@ -14,9 +14,9 @@ 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 b51fec688b..9dda06d031 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 3090a9a514..33dbd19e2f 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 623ac1df6b..eff419a1cb 100644 --- a/httpx/dispatch/http11.py +++ b/httpx/dispatch/http11.py @@ -2,7 +2,7 @@ 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 980b07b25c..f932598236 100644 --- a/httpx/dispatch/http2.py +++ b/httpx/dispatch/http2.py @@ -4,7 +4,7 @@ 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