summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.md4
-rw-r--r--docs/tests.documentation.rst6
-rw-r--r--setup.py3
-rw-r--r--src/decorator.py2
-rw-r--r--src/tests/documentation.py24
-rw-r--r--src/tests/test.py15
6 files changed, 30 insertions, 24 deletions
diff --git a/CHANGES.md b/CHANGES.md
index 8925845..5aced40 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,10 +1,10 @@
HISTORY
--------
-## Unreleased
+## 4.4.0 (2018-08-04)
Added a section "For the impatient" to the README, addressing an issue
-raised by Amir Malekpour.
+raised by Amir Malekpour. Added support for Python 3.7.
## 4.3.0 (2018-04-15)
diff --git a/docs/tests.documentation.rst b/docs/tests.documentation.rst
index 16f94a9..a2f847e 100644
--- a/docs/tests.documentation.rst
+++ b/docs/tests.documentation.rst
@@ -3,9 +3,9 @@ The ``decorator`` module
:Author: Michele Simionato
:E-mail: michele.simionato@gmail.com
-:Version: 4.3.0 (2018-04-15)
-:Supports: Python 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6
-:Download page: http://pypi.python.org/pypi/decorator/4.3.0
+:Version: 4.4.0 (2018-08-04)
+: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
:Installation: ``pip install decorator``
:License: BSD license
diff --git a/setup.py b/setup.py
index 2f07200..5343a98 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
from setuptools import setup
dic = dict(__file__=None)
-exec(open('src/decorator.py').read(), dic)
+exec(open('src/decorator.py').read(), dic) # extract the __version__
VERSION = dic['__version__']
@@ -33,6 +33,7 @@ if __name__ == '__main__':
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Software Development :: Libraries',
'Topic :: Utilities'],
diff --git a/src/decorator.py b/src/decorator.py
index dceca03..8aa8537 100644
--- a/src/decorator.py
+++ b/src/decorator.py
@@ -40,7 +40,7 @@ import operator
import itertools
import collections
-__version__ = '4.3.0'
+__version__ = '4.4.0'
if sys.version >= '3':
from inspect import getfullargspec
diff --git a/src/tests/documentation.py b/src/tests/documentation.py
index b496660..35224cb 100644
--- a/src/tests/documentation.py
+++ b/src/tests/documentation.py
@@ -1,4 +1,16 @@
from __future__ import print_function
+import sys
+import threading
+import time
+import functools
+import itertools
+import collections
+try:
+ import collections.abc as c
+except ImportError:
+ c = collections
+from decorator import (decorator, decorate, FunctionMaker, contextmanager,
+ dispatch_on, __version__)
doc = r"""\
The ``decorator`` module
@@ -6,7 +18,7 @@ The ``decorator`` module
: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
+: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/$VERSION
:Installation: ``pip install decorator``
:License: BSD license
@@ -1363,16 +1375,6 @@ Another attribute copied from the original function is ``__qualname__``,
the qualified name. This attribute was introduced in Python 3.3.
"""
-import sys
-import threading
-import time
-import functools
-import itertools
-import collections
-import collections as c
-from decorator import (decorator, decorate, FunctionMaker, contextmanager,
- dispatch_on, __version__)
-
if sys.version < '3':
function_annotations = ''
diff --git a/src/tests/test.py b/src/tests/test.py
index b42d062..6d4d210 100644
--- a/src/tests/test.py
+++ b/src/tests/test.py
@@ -6,10 +6,15 @@ import decimal
import inspect
import functools
import collections
+from collections import defaultdict
+try:
+ c = collections.abc
+except AttributeError:
+ c = collections
from decorator import dispatch_on, contextmanager, decorator
try:
from . import documentation as doc
-except:
+except ImportError:
import documentation as doc
@@ -23,6 +28,7 @@ def assertRaises(etype):
else:
raise Exception('Expected %s' % etype.__name__)
+
if sys.version >= '3.5':
exec('''from asyncio import get_event_loop
@@ -237,7 +243,6 @@ class TestSingleDispatch(unittest.TestCase):
self.assertEqual(g(rnd), ("Number got rounded",))
def test_register_abc(self):
- c = collections
d = {"a": "b"}
l = [1, 2, 3]
s = set([object(), None])
@@ -348,8 +353,6 @@ class TestSingleDispatch(unittest.TestCase):
self.assertEqual(g(t), "tuple")
def test_mro_conflicts(self):
- c = collections
-
@singledispatch
def g(obj):
return "base"
@@ -410,9 +413,9 @@ class TestSingleDispatch(unittest.TestCase):
# MutableMapping's bases implicit as well from defaultdict's
# perspective.
with assertRaises(RuntimeError):
- self.assertEqual(h(c.defaultdict(lambda: 0)), "sized")
+ self.assertEqual(h(defaultdict(lambda: 0)), "sized")
- class R(c.defaultdict):
+ class R(defaultdict):
pass
c.MutableSequence.register(R)