Skip to content

Commit

Permalink
Work around utter disregard of semver
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed Sep 22, 2015
1 parent 611ceac commit 7a945e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 2 additions & 3 deletions vdirsyncer/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys
import uuid

from .compat import iteritems, to_unicode
from .compat import getargspec_ish, iteritems, to_unicode
from .. import exceptions


Expand Down Expand Up @@ -84,8 +84,7 @@ def get_etag_from_fileobject(f):
def get_class_init_specs(cls, stop_at=object):
if cls is stop_at:
return ()
import inspect
spec = inspect.getargspec(cls.__init__)
spec = getargspec_ish(cls.__init__)
supercls = next(getattr(x.__init__, '__objclass__', x)
for x in cls.__mro__[1:])
return (spec,) + get_class_init_specs(supercls, stop_at=stop_at)
Expand Down
3 changes: 3 additions & 0 deletions vdirsyncer/utils/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def wrapper(x, *a, **kw):
if PY2: # pragma: no cover
import urlparse
import urllib as _urllib
from inspect import getargspec as getargspec_ish # noqa

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

else: # pragma: no cover
import urllib.parse as urlparse
from inspect import getfullargspec as getargspec_ish # noqa

urlquote = urlparse.quote
urlunquote = urlparse.unquote
text_type = str
Expand Down

0 comments on commit 7a945e3

Please sign in to comment.