Skip to content

Commit

Permalink
Fix func_persist: do not use the (now removed) inspect.formatargspec,
Browse files Browse the repository at this point in the history
but instead use inspect.signature.
  • Loading branch information
jhpalmieri committed Oct 19, 2023
1 parent b7c1c8f commit 5d8ddcf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/sage/misc/func_persist.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def bern(n):

from . import persist


class func_persist:
r"""
Put ``@func_persist`` right before your function
Expand All @@ -57,7 +56,7 @@ def __init__(self, f, dir='func_persist'):
os.makedirs(dir, exist_ok=True)
self.__doc__ = '%s%s%s' % (
f.__name__,
inspect.formatargspec(*inspect.getargs(f.__code__)),
inspect.signature(f),
f.__doc__)

def __call__(self, *args, **kwds):
Expand Down

0 comments on commit 5d8ddcf

Please sign in to comment.