diff options
-rw-r--r-- | CHANGES.md | 5 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | README.rst | 4 | ||||
-rw-r--r-- | docs/documentation.md | 16 | ||||
-rw-r--r-- | setup.py | 2 | ||||
-rw-r--r-- | src/decorator.py | 2 | ||||
-rw-r--r-- | src/tests/documentation.py | 4 |
7 files changed, 20 insertions, 15 deletions
@@ -3,6 +3,11 @@ HISTORY ## unreleased +## 4.4.1 (2019-10-27) + +Changed the description to "Decorators for Humans" are requested by +several users. Fixed a .rst bug in the description as seen in PyPI. + ## 4.4.0 (2019-03-16) Fixed a regression with decorator factories breaking the case with no @@ -2,4 +2,4 @@ md: src/tests/documentation.py python $(S)/ms/tools/py2md.py src/tests/documentation.py docs upload: README.md - python setup.py sdist bdist_wheel upload + rm -rf build/* dist/* && python setup.py sdist bdist_wheel upload @@ -1,5 +1,5 @@ -Decorator module -================= +Decorators for Humans +===================== The goal of the decorator module is to make it easy to define signature-preserving function decorators and decorator factories. diff --git a/docs/documentation.md b/docs/documentation.md index 82f642d..7ff010a 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -1,12 +1,12 @@ -The ``decorator`` module +Decorators for Humans ---------------------------------- |Author | Michele Simionato| |---|---| |E-mail | michele.simionato@gmail.com| -|Version| 4.4.0 (2019-03-16)| -|Supports| Python 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7| -|Download page| http://pypi.python.org/pypi/decorator/4.4.0| +|Version| 4.4.1 (2019-10-27)| +|Supports| Python 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8| +|Download page| http://pypi.python.org/pypi/decorator/4.4.1| |Installation| ``pip install decorator``| |License | BSD license| @@ -711,11 +711,11 @@ a ``__call__`` method, so that they can be used as decorators, like so: ```python >>> ba = before_after('BEFORE', 'AFTER') >>> ->>> @ba +>>> @ba ... def hello(): ... print('hello') ... ->>> hello() +>>> hello() BEFORE hello AFTER @@ -1605,8 +1605,8 @@ can only be used on user-defined Python functions or methods. They cannot be used on generic callable objects or built-in functions, due to limitations of the standard library's ``inspect`` module, especially for Python 2. In Python 3.5, many such limitations have been removed, but -I still think that it is cleaner and safer to decorate only -functions. If you want to decorate things like classmethods/staticmethods +I still think that it is cleaner and safer to decorate only functions and +coroutines. If you want to decorate things like classmethods/staticmethods and general callables - which I will never support in the decorator module - I suggest you to look at the [wrapt](https://wrapt.readthedocs.io/en/latest/) project by Graeme Dumpleton. @@ -8,7 +8,7 @@ VERSION = dic['__version__'] if __name__ == '__main__': setup(name='decorator', version=VERSION, - description='Better living through Python with decorators', + description='Decorators for Humans', long_description=open('README.rst').read(), author='Michele Simionato', author_email='michele.simionato@gmail.com', diff --git a/src/decorator.py b/src/decorator.py index 34fd527..78d227f 100644 --- a/src/decorator.py +++ b/src/decorator.py @@ -40,7 +40,7 @@ import operator import itertools import collections -__version__ = '4.4.0' +__version__ = '4.4.1' if sys.version >= '3': from inspect import getfullargspec diff --git a/src/tests/documentation.py b/src/tests/documentation.py index 6a77614..2888ea1 100644 --- a/src/tests/documentation.py +++ b/src/tests/documentation.py @@ -12,14 +12,14 @@ except ImportError: from decorator import (decorator, decorate, FunctionMaker, contextmanager, dispatch_on, __version__) -doc = r"""The ``decorator`` module +doc = r"""Decorators for Humans ---------------------------------- |Author | Michele Simionato| |---|---| |E-mail | michele.simionato@gmail.com| |Version| $VERSION ($DATE)| -|Supports| Python 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7| +|Supports| Python 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8| |Download page| http://pypi.python.org/pypi/decorator/$VERSION| |Installation| ``pip install decorator``| |License | BSD license| |