diff --git a/src/poetry/core/masonry/builders/wheel.py b/src/poetry/core/masonry/builders/wheel.py index e29213243..cc48f161a 100644 --- a/src/poetry/core/masonry/builders/wheel.py +++ b/src/poetry/core/masonry/builders/wheel.py @@ -361,13 +361,14 @@ def _get_sys_tags(self) -> list[str]: """, ], stderr=subprocess.STDOUT, + text=True, ) except subprocess.CalledProcessError as e: raise RuntimeError( "Failed to get sys_tags for python interpreter" f" '{self.executable.as_posix()}':\n{decode(e.output)}" ) - return decode(output).strip().splitlines() + return output.strip().splitlines() @property def tag(self) -> str: diff --git a/src/poetry/core/vcs/__init__.py b/src/poetry/core/vcs/__init__.py index f4096ec0e..4e03a8904 100644 --- a/src/poetry/core/vcs/__init__.py +++ b/src/poetry/core/vcs/__init__.py @@ -17,13 +17,11 @@ def get_vcs(directory: Path) -> Git | None: try: from poetry.core.vcs.git import executable - git_dir = ( - subprocess.check_output( - [executable(), "rev-parse", "--show-toplevel"], stderr=subprocess.STDOUT - ) - .decode() - .strip() - ) + git_dir = subprocess.check_output( + [executable(), "rev-parse", "--show-toplevel"], + stderr=subprocess.STDOUT, + text=True, + ).strip() vcs = Git(Path(git_dir))