summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd2/table_creator.py11
-rw-r--r--docs/conf.py1
2 files changed, 11 insertions, 1 deletions
diff --git a/cmd2/table_creator.py b/cmd2/table_creator.py
index b35cade6..bc0bb4c8 100644
--- a/cmd2/table_creator.py
+++ b/cmd2/table_creator.py
@@ -10,12 +10,21 @@ import functools
import io
from collections import deque
from enum import Enum
-from typing import Any, Deque, Optional, Sequence, Tuple, Union
+from typing import Any, Optional, Sequence, Tuple, Union
from wcwidth import wcwidth
from . import ansi, constants, utils
+# This is needed for compatibility with early versions of Python 3.5 prior to 3.5.4
+try:
+ from typing import Deque
+except ImportError:
+ import typing
+
+ # noinspection PyProtectedMember, PyUnresolvedReferences
+ Deque = typing._alias(deque, typing.T)
+
# Constants
EMPTY = ''
SPACE = ' '
diff --git a/docs/conf.py b/docs/conf.py
index 8a71268a..9396f000 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -19,6 +19,7 @@ documentation root, use os.path.abspath to make it absolute, like shown here.
"""
# Import for custom theme from Read the Docs
import sphinx_rtd_theme
+
import cmd2
# -- General configuration -----------------------------------------------------