From f5e399649fa312b42f76b9671206d5a4699d95c3 Mon Sep 17 00:00:00 2001 From: Cory Dodt <121705+corydodt@users.noreply.github.com> Date: Fri, 18 Dec 2020 16:47:59 -0800 Subject: [PATCH] (#21) check_output text=True needed in Python 3 --- README.md | 6 ++++++ codado/hotedit.py | 3 ++- setup.py | 2 +- tox.ini | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1326014..3ae1068 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,11 @@ Make sure to: ## Change Log +### [0.8.0] - 2020.12.18 +#### Fixed: + - Fix hotedit invocation in Python 3 (check_output returns bytes) (#21) + - This change officially breaks backwards compatibility with Python 2 + ### [0.7.6] - 2020.02.26 #### Changed: - The version of mock is no longer strictly specified, allowing higher versions to be used while this package is installed @@ -97,6 +102,7 @@ Make sure to: - 0.4: Initial public usable release [Crosscap]: https://github.com/corydodt/Crosscap +[0.8.0]: https://github.com/corydodt/Codado/compare/release-0.7.6...release-0.8.0 [0.7.6]: https://github.com/corydodt/Codado/compare/release-0.7.4...release-0.7.6 [0.7.4]: https://github.com/corydodt/Codado/compare/release-0.7.2...release-0.7.4 [0.7.2]: https://github.com/corydodt/Codado/compare/release-0.7.0...release-0.7.2 diff --git a/codado/hotedit.py b/codado/hotedit.py index d9b894e..a842238 100644 --- a/codado/hotedit.py +++ b/codado/hotedit.py @@ -44,7 +44,8 @@ def determine_editor(fallback=EDITOR_FALLBACK): If fallback=None, and none of these is a usable editor, raise OSError """ try: - ret = subprocess.check_output(shlex.split('git config core.editor')) + ret = subprocess.check_output(shlex.split('git config core.editor'), + text=True) return ret.strip() except subprocess.CalledProcessError: "git config core.editor didn't work, falling back to environment" diff --git a/setup.py b/setup.py index 3fde380..6c63e87 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages -__version__ = '0.7.6' +__version__ = '0.8.0' cfg = dict( diff --git a/tox.ini b/tox.ini index 71437b6..e4ef7f3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,py3 +envlist = py3 [testenv] commands = pytest --cov-fail-under=100 -vv