Skip to content

Commit 7a945e3

Browse files
committed
Work around utter disregard of semver
1 parent 611ceac commit 7a945e3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

vdirsyncer/utils/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import sys
55
import uuid
66

7-
from .compat import iteritems, to_unicode
7+
from .compat import getargspec_ish, iteritems, to_unicode
88
from .. import exceptions
99

1010

@@ -84,8 +84,7 @@ def get_etag_from_fileobject(f):
8484
def get_class_init_specs(cls, stop_at=object):
8585
if cls is stop_at:
8686
return ()
87-
import inspect
88-
spec = inspect.getargspec(cls.__init__)
87+
spec = getargspec_ish(cls.__init__)
8988
supercls = next(getattr(x.__init__, '__objclass__', x)
9089
for x in cls.__mro__[1:])
9190
return (spec,) + get_class_init_specs(supercls, stop_at=stop_at)

vdirsyncer/utils/compat.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def wrapper(x, *a, **kw):
3434
if PY2: # pragma: no cover
3535
import urlparse
3636
import urllib as _urllib
37+
from inspect import getargspec as getargspec_ish # noqa
3738

3839
# Horrible hack to make urllib play nice with u'...' urls from requests
3940
urlquote = _wrap_native(_urllib.quote)
@@ -46,6 +47,8 @@ def wrapper(x, *a, **kw):
4647

4748
else: # pragma: no cover
4849
import urllib.parse as urlparse
50+
from inspect import getfullargspec as getargspec_ish # noqa
51+
4952
urlquote = urlparse.quote
5053
urlunquote = urlparse.unquote
5154
text_type = str

0 commit comments

Comments
 (0)