From ad9d7f0b523d2aec94daa0b1f5ca6dacf6dff6d3 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Fri, 19 Mar 2021 09:51:51 +0100 Subject: [PATCH] FIX: hg backend won't work with PYTHONDEBUG=y This is due to hg currently having a warning: $ hg pull /usr/lib/python3.9/importlib/util.py:245: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses self.__spec__.loader.exec_module(self) and the has_remote function checking: if output.strip() == "": --- src/bumpver/vcs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bumpver/vcs.py b/src/bumpver/vcs.py index 0613d47..88c3fef 100644 --- a/src/bumpver/vcs.py +++ b/src/bumpver/vcs.py @@ -76,7 +76,7 @@ class VCSAPI: else: logger.debug(cmd_str) cmd_parts = shlex.split(cmd_str) - output_data: bytes = sp.check_output(cmd_parts, env=env, stderr=sp.STDOUT) + output_data: bytes = sp.check_output(cmd_parts, env=env, stderr=sp.PIPE) return output_data.decode("utf-8")