Skip to content

Commit

Permalink
Deprecated runner parameter to tarball_context
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jan 19, 2023
1 parent 80f4d01 commit 0e0ae08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
v4.3.0
======

Deprecated ``runner`` parameter to ``tarball_context``.

v4.2.1
======

Expand Down
3 changes: 3 additions & 0 deletions jaraco/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import tempfile
import shutil
import operator
import warnings


@contextlib.contextmanager
Expand Down Expand Up @@ -36,6 +37,8 @@ def tarball_context(url, target_dir=None, runner=None, pushd=pushd):
target_dir = os.path.basename(url).replace('.tar.gz', '').replace('.tgz', '')
if runner is None:
runner = functools.partial(subprocess.check_call, shell=True)
else:
warnings.warn("runner parameter is deprecated", DeprecationWarning)
# In the tar command, use --strip-components=1 to strip the first path and
# then
# use -C to cause the files to be extracted to {target_dir}. This ensures
Expand Down

0 comments on commit 0e0ae08

Please sign in to comment.