diff options
| author | Michele Simionato <michele.simionato@gmail.com> | 2021-05-16 06:07:04 +0200 |
|---|---|---|
| committer | Michele Simionato <michele.simionato@gmail.com> | 2021-05-16 06:07:10 +0200 |
| commit | aa579a12ce293e0a7e8df8728b4837bc05e458e3 (patch) | |
| tree | 655c31c11d63cc9cb2e7a7e9ae7d8e1fefa5a84e /src | |
| parent | bdccd9b7a48078f1ba57d2fb2785df864085a99f (diff) | |
| download | python-decorator-git-aa579a12ce293e0a7e8df8728b4837bc05e458e3.tar.gz | |
Fixed a test breaking PyPy and restored support for RST docs5.0.9
Diffstat (limited to 'src')
| -rw-r--r-- | src/decorator.py | 2 | ||||
| -rw-r--r-- | src/tests/test.py | 5 |
2 files changed, 3 insertions, 4 deletions
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 ############################# # |
