Skip to content

Commit 9d314de

Browse files
committed
Adding explicit python 3.5.3 test to nox, travis.
Copied 3.5.4 definition of typing.Deque
1 parent faaf79b commit 9d314de

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ language: python
22

33
matrix:
44
include:
5+
- os: linux
6+
python: 3.5.3
7+
env: NOXSESSION=tests-3.5.3
58
- os: linux
69
python: 3.5
710
env: NOXSESSION=tests-3.5

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 1.3.3 (TBD)
2+
* Bug Fixes
3+
* Added explicit testing against python 3.5.3 for Debian 9 support.
4+
* Added fallback definition of typing.Deque (taken from 3.5.4)
5+
* Other
6+
* Added missing doc-string for new cmd2.Cmd __init__ parameters
7+
introduced by CommandSet enhancement
8+
19
## 1.3.2 (August 10, 2020)
210
* Bug Fixes
311
* Fixed `prog` value of subcommands added with `as_subcommand_to()` decorator.

cmd2/table_creator.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,17 @@
2222
except ImportError: # pragma: no cover
2323
import typing
2424

25+
# The following copied from the implementation of Deque in Python 3.5.4
2526
# noinspection PyProtectedMember, PyUnresolvedReferences
26-
Deque = typing._alias(deque, typing.T)
27+
class Deque(deque, typing.MutableSequence[typing.T]):
28+
__slots__ = ()
29+
__extra__ = deque
30+
31+
def __new__(cls, *args, **kwds):
32+
if typing._geqv(cls, Deque):
33+
raise TypeError('Type Deque cannot be instantiated; use deque() instead')
34+
return typing._generic_new(deque, cls, *args, **kwds)
35+
2736

2837
# Constants
2938
EMPTY = ''

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def docs(session):
1414
'-d', '{}/doctrees'.format(tmpdir), '.', '{}/html'.format(tmpdir))
1515

1616

17-
@nox.session(python=['3.5', '3.6', '3.7', '3.8', '3.9'])
17+
@nox.session(python=['3.5.3', '3.5', '3.6', '3.7', '3.8', '3.9'])
1818
@nox.parametrize('plugin', [None,
1919
'ext_test',
2020
'template',

0 commit comments

Comments
 (0)