mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Remove requests_toolbelt
This commit is contained in:
parent
611b8667a3
commit
89a01631fa
2 changed files with 0 additions and 26 deletions
3
setup.py
3
setup.py
|
|
@ -16,9 +16,6 @@ requirements = [
|
||||||
"click>=5.0,<9.0",
|
"click>=5.0,<9.0",
|
||||||
"click-log>=0.3.0, <0.5.0",
|
"click-log>=0.3.0, <0.5.0",
|
||||||
"requests >=2.20.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
|
# https://github.com/untitaker/python-atomicwrites/commit/4d12f23227b6a944ab1d99c507a69fdbc7c9ed6d # noqa
|
||||||
"atomicwrites>=0.1.7",
|
"atomicwrites>=0.1.7",
|
||||||
"aiohttp>=3.8.0,<4.0.0",
|
"aiohttp>=3.8.0,<4.0.0",
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import aiohttp
|
||||||
import requests.auth
|
import requests.auth
|
||||||
from requests.utils import parse_dict_header
|
from requests.utils import parse_dict_header
|
||||||
|
|
||||||
from . import DOCS_HOME
|
|
||||||
from . import __version__
|
from . import __version__
|
||||||
from . import exceptions
|
from . import exceptions
|
||||||
from .utils import expand_path
|
from .utils import expand_path
|
||||||
|
|
@ -19,28 +18,6 @@ logger = logging.getLogger(__name__)
|
||||||
USERAGENT = f"vdirsyncer/{__version__}"
|
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):
|
class AuthMethod(ABC):
|
||||||
def __init__(self, username, password):
|
def __init__(self, username, password):
|
||||||
self.username = username
|
self.username = username
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue