summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichele Simionato <michele.simionato@gmail.com>2021-05-16 06:07:04 +0200
committerMichele Simionato <michele.simionato@gmail.com>2021-05-16 06:07:10 +0200
commitaa579a12ce293e0a7e8df8728b4837bc05e458e3 (patch)
tree655c31c11d63cc9cb2e7a7e9ae7d8e1fefa5a84e
parentbdccd9b7a48078f1ba57d2fb2785df864085a99f (diff)
downloadpython-decorator-git-aa579a12ce293e0a7e8df8728b4837bc05e458e3.tar.gz
Fixed a test breaking PyPy and restored support for RST docs5.0.9
-rw-r--r--CHANGES.md4
-rw-r--r--docs/conf.py1
-rw-r--r--docs/documentation.md4
-rw-r--r--docs/index.md1
-rw-r--r--docs/index.rst2
-rw-r--r--src/decorator.py2
-rw-r--r--src/tests/test.py5
7 files changed, 12 insertions, 7 deletions
diff --git a/CHANGES.md b/CHANGES.md
index 28105a7..596559b 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -3,6 +3,10 @@ HISTORY
## unreleased
+## 5.0.9 (2021-05-16)
+
+Fixed a test breaking PyPy. Restored support for Sphinx.
+
## 5.0.8 (2021-05-15)
Made the decorator module more robust when decorating builtin functions
diff --git a/docs/conf.py b/docs/conf.py
index 51ce1f8..477886a 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -30,6 +30,7 @@ from decorator import __version__
# ones.
extensions = [
'sphinx.ext.viewcode',
+ 'myst_parser'
]
# Add any paths that contain templates here, relative to this directory.
diff --git a/docs/documentation.md b/docs/documentation.md
index 2637055..38be1bf 100644
--- a/docs/documentation.md
+++ b/docs/documentation.md
@@ -4,9 +4,9 @@ Decorators for Humans
|Author | Michele Simionato|
|---|---|
|E-mail | michele.simionato@gmail.com|
-|Version| 5.0.8 (2021-05-15)|
+|Version| 5.0.9 (2021-05-16)|
|Supports| Python 3.5, 3.6, 3.7, 3.8, 3.9|
-|Download page| http://pypi.python.org/pypi/decorator/5.0.8|
+|Download page| http://pypi.python.org/pypi/decorator/5.0.9|
|Installation| ``pip install decorator``|
|License | BSD license|
diff --git a/docs/index.md b/docs/index.md
deleted file mode 100644
index 1849da5..0000000
--- a/docs/index.md
+++ /dev/null
@@ -1 +0,0 @@
-- [master](documentation.md)
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644
index 0000000..30140e8
--- /dev/null
+++ b/docs/index.rst
@@ -0,0 +1,2 @@
+.. toctree::
+ documentation
diff --git a/src/decorator.py b/src/decorator.py
index d3840cc..438dff6 100644
--- a/src/decorator.py
+++ b/src/decorator.py
@@ -40,7 +40,7 @@ import itertools
from contextlib import _GeneratorContextManager
from inspect import getfullargspec, iscoroutinefunction, isgeneratorfunction
-__version__ = '5.0.8'
+__version__ = '5.0.9'
DEF = re.compile(r'\s*def\s*([_\w][_\w\d]*)\s*\(')
POS = inspect.Parameter.POSITIONAL_OR_KEYWORD
diff --git a/src/tests/test.py b/src/tests/test.py
index 4531ce3..be9f851 100644
--- a/src/tests/test.py
+++ b/src/tests/test.py
@@ -188,11 +188,10 @@ class ExtraTestCase(unittest.TestCase):
dd = defaultdict(list)
doc.trace(defaultdict.__setitem__)(dd, 'x', [1])
self.assertEqual(dd['x'], [1])
- # NB: defaultdict.__getitem__ has no signature and cannot be decorated
- with self.assertRaises(ValueError):
- doc.trace(defaultdict.__getitem__)
doc.trace(defaultdict.__delitem__)(dd, 'x')
self.assertEqual(dd['x'], [])
+ # NB: defaultdict.__getitem__ has no signature and cannot be
+ # decorated in CPython, while it is regular in PyPy
# ################### test dispatch_on ############################# #