mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Work around utter disregard of semver
This commit is contained in:
parent
611ceac847
commit
7a945e3721
2 changed files with 5 additions and 3 deletions
|
|
@ -4,7 +4,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from .compat import iteritems, to_unicode
|
from .compat import getargspec_ish, iteritems, to_unicode
|
||||||
from .. import exceptions
|
from .. import exceptions
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -84,8 +84,7 @@ def get_etag_from_fileobject(f):
|
||||||
def get_class_init_specs(cls, stop_at=object):
|
def get_class_init_specs(cls, stop_at=object):
|
||||||
if cls is stop_at:
|
if cls is stop_at:
|
||||||
return ()
|
return ()
|
||||||
import inspect
|
spec = getargspec_ish(cls.__init__)
|
||||||
spec = inspect.getargspec(cls.__init__)
|
|
||||||
supercls = next(getattr(x.__init__, '__objclass__', x)
|
supercls = next(getattr(x.__init__, '__objclass__', x)
|
||||||
for x in cls.__mro__[1:])
|
for x in cls.__mro__[1:])
|
||||||
return (spec,) + get_class_init_specs(supercls, stop_at=stop_at)
|
return (spec,) + get_class_init_specs(supercls, stop_at=stop_at)
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ def _wrap_native(f, encoding='utf-8'):
|
||||||
if PY2: # pragma: no cover
|
if PY2: # pragma: no cover
|
||||||
import urlparse
|
import urlparse
|
||||||
import urllib as _urllib
|
import urllib as _urllib
|
||||||
|
from inspect import getargspec as getargspec_ish # noqa
|
||||||
|
|
||||||
# Horrible hack to make urllib play nice with u'...' urls from requests
|
# Horrible hack to make urllib play nice with u'...' urls from requests
|
||||||
urlquote = _wrap_native(_urllib.quote)
|
urlquote = _wrap_native(_urllib.quote)
|
||||||
|
|
@ -46,6 +47,8 @@ if PY2: # pragma: no cover
|
||||||
|
|
||||||
else: # pragma: no cover
|
else: # pragma: no cover
|
||||||
import urllib.parse as urlparse
|
import urllib.parse as urlparse
|
||||||
|
from inspect import getfullargspec as getargspec_ish # noqa
|
||||||
|
|
||||||
urlquote = urlparse.quote
|
urlquote = urlparse.quote
|
||||||
urlunquote = urlparse.unquote
|
urlunquote = urlparse.unquote
|
||||||
text_type = str
|
text_type = str
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue