diff --git a/CHANGES.md b/CHANGES.md index a867bed..36a5877 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,8 +3,12 @@ HISTORY ## Unreleased -The "fix" in version 5.1 broke `decorator.contextmanager` even more. -This is now solved, thanks to Wim Glenn. +## 5.1.1 (2022-01-07) + +Sangwoo Shim contributed a fix so that cythonized functions can be decorated. +Brian McFee pointed out an issue in the `decorator_apply` example and +Wim Glenn pointed out that the "fix" in version 5.1 broke +`decorator.contextmanager` even more. Both issues are now solved. ## 5.1.0 (2021-09-11) diff --git a/docs/documentation.md b/docs/documentation.md index cbbc540..10ddb5f 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -3,9 +3,9 @@ |Author | Michele Simionato| |---|---| |E-mail | michele.simionato@gmail.com| -|Version| 5.1.0 (2021-09-11)| +|Version| 5.1.1 (2022-01-07)| |Supports| Python 3.5, 3.6, 3.7, 3.8, 3.9, 3.10| -|Download page| http://pypi.python.org/pypi/decorator/5.1.0| +|Download page| http://pypi.python.org/pypi/decorator/5.1.1| |Installation| ``pip install decorator``| |License | BSD license| @@ -923,7 +923,7 @@ You can use a ``FunctionMaker`` to implement that functionality as follows: is not a signature-preserving decorator. """ return FunctionMaker.create( - func, 'return decfunc(%(signature)s)', + func, 'return decfunc(%(shortsignature)s)', dict(decfunc=dec(func)), __wrapped__=func) ``` diff --git a/src/decorator.py b/src/decorator.py index 257b1b1..2479b6f 100644 --- a/src/decorator.py +++ b/src/decorator.py @@ -40,7 +40,7 @@ from contextlib import _GeneratorContextManager from inspect import getfullargspec, iscoroutinefunction, isgeneratorfunction -__version__ = '5.1.0' +__version__ = '5.1.1' DEF = re.compile(r'\s*def\s*([_\w][_\w\d]*)\s*\(') POS = inspect.Parameter.POSITIONAL_OR_KEYWORD