From 1b656a3b28cc8aa2fb530783f53f05be79846dc7 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sat, 8 Jan 2022 13:27:02 +0100 Subject: [PATCH] Readd sage_wraps in deprecated methods --- src/sage/misc/decorators.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sage/misc/decorators.py b/src/sage/misc/decorators.py index 60e49f07ff6..31cbb65c1ab 100644 --- a/src/sage/misc/decorators.py +++ b/src/sage/misc/decorators.py @@ -37,6 +37,7 @@ sage_getargspec) from inspect import ArgSpec + def sage_wraps(wrapped, assigned=WRAPPER_ASSIGNMENTS, updated=WRAPPER_UPDATES): r""" Decorator factory which should be used in decorators for making sure that @@ -397,6 +398,7 @@ def __call__(self, func): sage: sage_getargspec(f) ArgSpec(args=['arrow_size'], varargs='args', keywords='kwds', defaults=(2,)) """ + @sage_wraps(func) def wrapper(func, *args, **kwds): suboptions = copy(self.options) suboptions.update(kwds.pop(self.name+"options", {})) @@ -485,6 +487,7 @@ def __call__(self, func): () [('__original_opts', {'alpha': 1}), ('alpha', 1), ('rgbcolor', (0, 0, 1))] """ + @sage_wraps(func) def wrapper(func, *args, **kwds): options = copy(wrapper.options) if self.original_opts: