Repository: conda/conda

Issue:
_pip_install_via_requirements got an unexpected keyword argument 'prune'
```
{
  "command":"/home/travis/miniconda/bin/conda-env update",
  "conda_info":{
    "GID":2000,
    "UID":2000,
    "_channels":"https://conda.anaconda.org/conda-canary/linux-64
                          https://conda.anaconda.org/conda-canary/noarch
                          https://repo.continuum.io/pkgs/free/linux-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/r/linux-64
                          https://repo.continuum.io/pkgs/r/noarch
                          https://repo.continuum.io/pkgs/pro/linux-64
                          https://repo.continuum.io/pkgs/pro/noarch",
    "_config_files":"/home/travis/.condarc",
    "_envs_dirs":"/home/travis/miniconda/envs
                          /home/travis/.conda/envs",
    "_pkgs_dirs":"/home/travis/miniconda/pkgs
                          /home/travis/.conda/pkgs",
    "_rtwro":"writable",
    "active_prefix":null,
    "active_prefix_name":null,
    "channels":[
      "https://conda.anaconda.org/conda-canary/linux-64",
      "https://conda.anaconda.org/conda-canary/noarch",
      "https://repo.continuum.io/pkgs/free/linux-64",
      "https://repo.continuum.io/pkgs/free/noarch",
      "https://repo.continuum.io/pkgs/r/linux-64",
      "https://repo.continuum.io/pkgs/r/noarch",
      "https://repo.continuum.io/pkgs/pro/linux-64",
      "https://repo.continuum.io/pkgs/pro/noarch"
    ],
    "conda_build_version":"not installed",
    "conda_env_version":"4.4.0rc0",
    "conda_location":"/home/travis/miniconda/lib/python3.6/site-packages/conda",
    "conda_prefix":"/home/travis/miniconda",
    "conda_private":false,
    "conda_shlvl":-1,
    "conda_version":"4.4.0rc0",
    "config_files":[
      "/home/travis/.condarc"
    ],
    "default_prefix":"/home/travis/miniconda",
    "envs":[

    ],
    "envs_dirs":[
      "/home/travis/miniconda/envs",
      "/home/travis/.conda/envs"
    ],
    "netrc_file":null,
    "offline":false,
    "pkgs_dirs":[
      "/home/travis/miniconda/pkgs",
      "/home/travis/.conda/pkgs"
    ],
    "platform":"linux-64",
    "python_version":"3.6.1.final.0",
    "rc_path":"/home/travis/.condarc",
    "requests_version":"2.14.2",
    "root_prefix":"/home/travis/miniconda",
    "root_writable":true,
    "sys_rc_path":"/home/travis/miniconda/.condarc",
    "user_agent":"conda/4.4.0rc0 requests/2.14.2 CPython/3.6.1 Linux/4.4.0-83-generic ubuntu/14.04 glibc/2.19",
    "user_rc_path":"/home/travis/.condarc"
  },
  "error":"TypeError(\"_pip_install_via_requirements() got an unexpected keyword argument 'prune'\",)",
  "exception_name":"TypeError",
  "exception_type":"<class 'TypeError'>",
  "traceback":"Traceback (most recent call last):
  File \"/home/travis/miniconda/lib/python3.6/site-packages/conda/exceptions.py\", line 653, in __call__
    return func(*args, **kwargs)
  File \"/home/travis/miniconda/lib/python3.6/site-packages/conda_env/cli/main_update.py\", line 107, in execute
    installer.install(prefix, specs, args, env, prune=args.prune)
TypeError: _pip_install_via_requirements() got an unexpected keyword argument 'prune'
"
}
```


Discussion:

Resolving patch:
diff --git a/conda_env/cli/main_update.py b/conda_env/cli/main_update.py
--- a/conda_env/cli/main_update.py
+++ b/conda_env/cli/main_update.py
@@ -104,7 +104,7 @@ def execute(args, parser):
     for installer_type, specs in env.dependencies.items():
         try:
             installer = get_installer(installer_type)
-            installer.install(prefix, specs, args, env, prune=args.prune)
+            installer.install(prefix, specs, args, env)
         except InvalidInstaller:
             sys.stderr.write(textwrap.dedent("""
                 Unable to install package for {0}.
diff --git a/conda_env/installers/conda.py b/conda_env/installers/conda.py
--- a/conda_env/installers/conda.py
+++ b/conda_env/installers/conda.py
@@ -8,7 +8,7 @@
 from conda.models.channel import Channel, prioritize_channels
 
 
-def install(prefix, specs, args, env, prune=False):
+def install(prefix, specs, args, env, *_, **kwargs):
     # TODO: support all various ways this happens
     # Including 'nodefaults' in the channels list disables the defaults
     new_specs = []
@@ -33,7 +33,7 @@ def install(prefix, specs, args, env, prune=False):
     subdirs = IndexedSet(basename(url) for url in _channel_priority_map)
 
     solver = Solver(prefix, channels, subdirs, specs_to_add=specs)
-    unlink_link_transaction = solver.solve_for_transaction(prune=prune)
+    unlink_link_transaction = solver.solve_for_transaction(prune=getattr(args, 'prune', False))
 
     pfe = unlink_link_transaction.get_pfe()
     pfe.execute()
diff --git a/conda_env/installers/pip.py b/conda_env/installers/pip.py
--- a/conda_env/installers/pip.py
+++ b/conda_env/installers/pip.py
@@ -8,7 +8,7 @@
 from conda.exceptions import CondaValueError
 
 
-def _pip_install_via_requirements(prefix, specs, args, *_):
+def _pip_install_via_requirements(prefix, specs, args, *_, **kwargs):
     """
     Installs the pip dependencies in specs using a temporary pip requirements file.
 


Test patch: