diff --git a/setup.py b/setup.py index 85b11c0..d9acadc 100644 --- a/setup.py +++ b/setup.py @@ -16,9 +16,6 @@ requirements = [ "click>=5.0,<9.0", "click-log>=0.3.0, <0.5.0", "requests >=2.20.0", - # https://github.com/sigmavirus24/requests-toolbelt/pull/28 - # And https://github.com/sigmavirus24/requests-toolbelt/issues/54 - "requests_toolbelt >=0.4.0", # https://github.com/untitaker/python-atomicwrites/commit/4d12f23227b6a944ab1d99c507a69fdbc7c9ed6d # noqa "atomicwrites>=0.1.7", "aiohttp>=3.8.0,<4.0.0", diff --git a/vdirsyncer/http.py b/vdirsyncer/http.py index 2f89082..91c1ff0 100644 --- a/vdirsyncer/http.py +++ b/vdirsyncer/http.py @@ -10,7 +10,6 @@ import aiohttp import requests.auth from requests.utils import parse_dict_header -from . import DOCS_HOME from . import __version__ from . import exceptions from .utils import expand_path @@ -19,28 +18,6 @@ logger = logging.getLogger(__name__) USERAGENT = f"vdirsyncer/{__version__}" -def _detect_faulty_requests(): # pragma: no cover - text = ( - "Error during import: {e}\n\n" - "If you have installed vdirsyncer from a distro package, please file " - "a bug against that package, not vdirsyncer.\n\n" - "Consult {d}/problems.html#requests-related-importerrors" - "-based-distributions on how to work around this." - ) - - try: - from requests_toolbelt.auth.guess import GuessAuth # noqa - except ImportError as e: - import sys - - print(text.format(e=str(e), d=DOCS_HOME), file=sys.stderr) - sys.exit(1) - - -_detect_faulty_requests() -del _detect_faulty_requests - - class AuthMethod(ABC): def __init__(self, username, password): self.username = username