diff --git a/textproc/py-humanfriendly/Makefile b/textproc/py-humanfriendly/Makefile index 9ea6fc6bcf8..3d84be63f66 100644 --- a/textproc/py-humanfriendly/Makefile +++ b/textproc/py-humanfriendly/Makefile @@ -5,7 +5,7 @@ MODPY_DISTV= 10.0 DISTNAME= humanfriendly-${MODPY_DISTV} PKGNAME= py-${DISTNAME} CATEGORIES= textproc -REVISION= 2 +REVISION= 3 HOMEPAGE= https://humanfriendly.readthedocs.io/ diff --git a/textproc/py-humanfriendly/patches/patch-humanfriendly_cli_py b/textproc/py-humanfriendly/patches/patch-humanfriendly_cli_py new file mode 100644 index 00000000000..e4a05e50a9c --- /dev/null +++ b/textproc/py-humanfriendly/patches/patch-humanfriendly_cli_py @@ -0,0 +1,21 @@ +Index: humanfriendly/cli.py +--- humanfriendly/cli.py.orig ++++ humanfriendly/cli.py +@@ -79,7 +79,7 @@ Supported options: + # Standard library modules. + import functools + import getopt +-import pipes ++import shlex + import subprocess + import sys + +@@ -176,7 +176,7 @@ def main(): + def run_command(command_line): + """Run an external command and show a spinner while the command is running.""" + timer = Timer() +- spinner_label = "Waiting for command: %s" % " ".join(map(pipes.quote, command_line)) ++ spinner_label = "Waiting for command: %s" % " ".join(map(shlex.quote, command_line)) + with Spinner(label=spinner_label, timer=timer) as spinner: + process = subprocess.Popen(command_line) + while True: diff --git a/textproc/py-humanfriendly/patches/patch-humanfriendly_testing_py b/textproc/py-humanfriendly/patches/patch-humanfriendly_testing_py new file mode 100644 index 00000000000..d1db9b90d94 --- /dev/null +++ b/textproc/py-humanfriendly/patches/patch-humanfriendly_testing_py @@ -0,0 +1,21 @@ +Index: humanfriendly/testing.py +--- humanfriendly/testing.py.orig ++++ humanfriendly/testing.py +@@ -25,7 +25,7 @@ its much better error reporting) but I've yet to publi + import functools + import logging + import os +-import pipes ++import shlex + import shutil + import sys + import tempfile +@@ -521,7 +521,7 @@ class MockedProgram(CustomSearchPath): + pathname = os.path.join(directory, self.program_name) + with open(pathname, 'w') as handle: + handle.write('#!/bin/sh\n') +- handle.write('echo > %s\n' % pipes.quote(self.program_signal_file)) ++ handle.write('echo > %s\n' % shlex.quote(self.program_signal_file)) + if self.program_script: + handle.write('%s\n' % self.program_script.strip()) + handle.write('exit %i\n' % self.program_returncode)