Skip to content

Commit

Permalink
Hacky fix for Python 3.11 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
emcd committed Oct 29, 2022
1 parent ce85bdf commit fb40a3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion invoke/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version_info__ = (1, 7, 3)
__version_info__ = (1, 7, 6)
__version__ = ".".join(map(str, __version_info__))
4 changes: 2 additions & 2 deletions invoke/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"""

from copy import deepcopy
import inspect
import types

from .context import Context
from .parser import Argument, translate_underscores
from .util import six
from .vendor.decorator import getargspec

if six.PY3:
from itertools import zip_longest
Expand Down Expand Up @@ -150,7 +150,7 @@ def argspec(self, body):
# TODO: __call__ exhibits the 'self' arg; do we manually nix 1st result
# in argspec, or is there a way to get the "really callable" spec?
func = body if isinstance(body, types.FunctionType) else body.__call__
spec = inspect.getargspec(func)
spec = getargspec(func)
arg_names = spec.args[:]
matched_args = [reversed(x) for x in [spec.args, spec.defaults or []]]
spec_dict = dict(zip_longest(*matched_args, fillvalue=NO_DEFAULT))
Expand Down

0 comments on commit fb40a3c

Please sign in to comment.