diff options
-rw-r--r-- | .travis.yml | 3 | ||||
-rw-r--r-- | CHANGELOG.md | 8 | ||||
-rw-r--r-- | cmd2/table_creator.py | 11 | ||||
-rw-r--r-- | noxfile.py | 2 |
4 files changed, 22 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml index 521c383c..aff51bcb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,9 @@ language: python matrix: include: - os: linux + python: 3.5.3 + env: NOXSESSION=tests-3.5.3 + - os: linux python: 3.5 env: NOXSESSION=tests-3.5 - os: linux diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ba8c53c..284c52d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.3.3 (TBD) +* Bug Fixes + * Added explicit testing against python 3.5.3 for Debian 9 support. + * Added fallback definition of typing.Deque (taken from 3.5.4) +* Other + * Added missing doc-string for new cmd2.Cmd __init__ parameters + introduced by CommandSet enhancement + ## 1.3.2 (August 10, 2020) * Bug Fixes * Fixed `prog` value of subcommands added with `as_subcommand_to()` decorator. diff --git a/cmd2/table_creator.py b/cmd2/table_creator.py index 8b9524a1..7a5c826c 100644 --- a/cmd2/table_creator.py +++ b/cmd2/table_creator.py @@ -22,8 +22,17 @@ try: except ImportError: # pragma: no cover import typing + # The following copied from the implementation of Deque in Python 3.5.4 # noinspection PyProtectedMember, PyUnresolvedReferences - Deque = typing._alias(deque, typing.T) + class Deque(deque, typing.MutableSequence[typing.T]): + __slots__ = () + __extra__ = deque + + def __new__(cls, *args, **kwds): + if typing._geqv(cls, Deque): + raise TypeError('Type Deque cannot be instantiated; use deque() instead') + return typing._generic_new(deque, cls, *args, **kwds) + # Constants EMPTY = '' @@ -14,7 +14,7 @@ def docs(session): '-d', '{}/doctrees'.format(tmpdir), '.', '{}/html'.format(tmpdir)) -@nox.session(python=['3.5', '3.6', '3.7', '3.8', '3.9']) +@nox.session(python=['3.5.3', '3.5', '3.6', '3.7', '3.8', '3.9']) @nox.parametrize('plugin', [None, 'ext_test', 'template', |