diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-06-14 23:26:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-14 23:26:54 -0400 |
commit | b3759991adca62779ef7aefbff9dc7004463e129 (patch) | |
tree | 775392576e5c6cd987132c2181b220bb3c09087f /cmd2/cmd2.py | |
parent | 57ac00c5001dd39dff0fb7800bb8d530c320d7be (diff) | |
parent | 7a30803cd2111e71da644123597cb665885695a8 (diff) | |
download | cmd2-git-b3759991adca62779ef7aefbff9dc7004463e129.tar.gz |
Merge pull request #700 from python-cmd2/deprecate_34
Deprecate Python 3.4 and add support and testing for Python 3.8
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r-- | cmd2/cmd2.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 8f5a7abe..7fcb38d6 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -39,6 +39,7 @@ import re import sys import threading from collections import namedtuple +from contextlib import redirect_stdout from typing import Any, Callable, Dict, List, Mapping, Optional, Tuple, Type, Union, IO import colorama @@ -103,12 +104,6 @@ except ImportError: return True return NotImplemented -# Python 3.4 require contextlib2 for temporarily redirecting stderr and stdout -if sys.version_info < (3, 5): - # noinspection PyUnresolvedReferences - from contextlib2 import redirect_stdout -else: - from contextlib import redirect_stdout # Detect whether IPython is installed to determine if the built-in "ipy" command should be included ipython_available = True |