diff --git a/python/httpx/_exceptions.py b/python/httpx/_exceptions.py index dd7fb6cd..d01457e0 100644 --- a/python/httpx/_exceptions.py +++ b/python/httpx/_exceptions.py @@ -36,6 +36,8 @@ from __future__ import annotations import contextlib import typing +from ._httpx import InvalidURL + if typing.TYPE_CHECKING: from ._models import Request, Response # pragma: no cover @@ -268,15 +270,6 @@ class HTTPStatusError(HTTPError): self.response = response -class InvalidURL(Exception): - """ - URL is improperly formed or cannot be parsed. - """ - - def __init__(self, message: str) -> None: - super().__init__(message) - - class CookieConflict(Exception): """ Attempted to lookup a cookie by name, but multiple cookies existed.