Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge #3191, #3196 and #3209 #3217

Merged
merged 89 commits into from
Nov 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
80a6dcb
add PIPENV_SKIP_LOCK envvar, and suitable doc
devxpy Oct 27, 2018
023e786
fix PIPENV_SKIP_LOCK for `pipenv unisntall` command.
devxpy Oct 27, 2018
09ba364
Merge branch 'master' into master
devxpy Oct 30, 2018
e2769fe
Merge branch 'master' into master
devxpy Oct 30, 2018
9ed610f
Merge branch 'master' into master
devxpy Nov 3, 2018
18be92b
Merge branch 'master' into master
devxpy Nov 7, 2018
2b195dd
fix errors from merge
devxpy Nov 8, 2018
3eba19d
Improve toml parsing
frostming Nov 8, 2018
e147dc3
Drops prettytoml/contoml form vendors
frostming Nov 8, 2018
b27d6a7
clear references in patched.txt
frostming Nov 8, 2018
1555200
Add back some tests
frostming Nov 8, 2018
53b073c
python 2.7 unicode
frostming Nov 8, 2018
b3aa66b
make tomlkit dump toml's inline table
frostming Nov 8, 2018
9743d98
Merge branch 'master' into improve-toml-parse
techalchemy Nov 8, 2018
36f054d
Grab updates from latest vendored changes
techalchemy Nov 8, 2018
65d7090
Force inline table
frostming Nov 8, 2018
5b49670
Fix broken requirementslib updates
techalchemy Nov 8, 2018
f3003b6
Merge branch 'master' into update-vendor
techalchemy Nov 8, 2018
0762528
Final fix
frostming Nov 9, 2018
3490fc8
fix patch
frostming Nov 9, 2018
de78c1e
Only convert outline tables when write toml
frostming Nov 9, 2018
accd0ea
Move to utils function
frostming Nov 9, 2018
6df7d88
update tomlkit
frostming Nov 10, 2018
1f7c9ef
update patch
frostming Nov 10, 2018
de98b87
backports import
frostming Nov 10, 2018
f5c7c58
Change fallback style
frostming Nov 10, 2018
2b90c89
Revendor requirementslib
techalchemy Nov 11, 2018
dec7be5
Introduce `pipenv.environments.Environment`
techalchemy Nov 11, 2018
642b6f9
Update vistir and requirementslib
techalchemy Nov 11, 2018
aedb41c
Fix stdout and stderr wrappers
techalchemy Nov 11, 2018
45100b8
Fix stdout and stderr wrappers
techalchemy Nov 11, 2018
118c9d3
Add dramatically improved queued installation
techalchemy Nov 11, 2018
5602952
Merge branch 'update-vendor' of github.com:pypa/pipenv into update-ve…
techalchemy Nov 11, 2018
690d1e8
Merge branch 'update-vendor' into feature/improved-async-installer
techalchemy Nov 11, 2018
8644611
Merge branch 'master' into update-vendor
techalchemy Nov 11, 2018
ac96370
Merge branch 'update-vendor' into feature/improved-async-installer
techalchemy Nov 11, 2018
8643a73
Fix configparser import
techalchemy Nov 11, 2018
0caf7a0
Fix configparser import
techalchemy Nov 11, 2018
650cc32
Fix resource errors
techalchemy Nov 11, 2018
fe9d996
Fix resource errors
techalchemy Nov 11, 2018
e5be2ac
Fix python 2.7 installations
techalchemy Nov 12, 2018
382be38
Fix python 2.7 installations
techalchemy Nov 12, 2018
489e534
Fix various bugs with python 2.7 and vendored deps
techalchemy Nov 12, 2018
3984632
Fix various bugs with python 2.7 and vendored deps
techalchemy Nov 12, 2018
32a6dd3
Support python 2 parsing
techalchemy Nov 12, 2018
4009198
Fix environment site import
techalchemy Nov 12, 2018
32b1113
Support python 2 parsing
techalchemy Nov 12, 2018
1216ae0
Fix environment site import
techalchemy Nov 12, 2018
70fc92b
Fix import errors on setup parsing
techalchemy Nov 12, 2018
7e139ad
Fix import errors on setup parsing
techalchemy Nov 12, 2018
8502ac9
Revendor
techalchemy Nov 12, 2018
013e3d0
Revendor
techalchemy Nov 12, 2018
96cbd58
Fix prefix comparison for py2
techalchemy Nov 12, 2018
8fa4057
Merge branch 'master' into update-vendor
techalchemy Nov 12, 2018
0c7f287
Fix prefix comparison for py2
techalchemy Nov 12, 2018
eed0f0f
Merge branch 'master' into feature/improved-async-installer
techalchemy Nov 12, 2018
d7d50ef
no samefile for windows python2.7
techalchemy Nov 12, 2018
9eabde0
no samefile for windows python2.7
techalchemy Nov 12, 2018
ef59d15
Fix bugs in environment implementation
techalchemy Nov 13, 2018
9296f56
Fix bugs in environment implementation
techalchemy Nov 13, 2018
e62b800
Fix syntax
techalchemy Nov 13, 2018
cb601b0
Fix syntax
techalchemy Nov 13, 2018
13c9e62
Update pythonfinder
techalchemy Nov 13, 2018
7bc754a
Merge branch 'master' into update-vendor
techalchemy Nov 13, 2018
d73879b
Update requirementslib
techalchemy Nov 13, 2018
e328ae2
Fix feedback
techalchemy Nov 13, 2018
310e0b2
Fix pythonfinder
techalchemy Nov 13, 2018
6b3c9a7
Remove accidentally committed test script
techalchemy Nov 13, 2018
4370281
Merge branch 'update-vendor' into feature/improved-async-installer
techalchemy Nov 13, 2018
c3cdbfb
Merge remote-tracking branch 'frostming/improve-toml-parse' into main…
techalchemy Nov 13, 2018
72e2ef7
Derive source names from URLs when not supplied
techalchemy Nov 13, 2018
1e3b8f9
Update news entries
techalchemy Nov 13, 2018
15f8d78
Syntax error and pythonfinder issue fixes
techalchemy Nov 13, 2018
f494571
Code cleanup -- unused functions
techalchemy Nov 13, 2018
2e10ff6
Fix pythonfinder
techalchemy Nov 13, 2018
f9b97da
Get rid of split file test
techalchemy Nov 14, 2018
095c9ef
remove useless tests
frostming Nov 14, 2018
08c384b
Implement `auto_envvar_prefix`
techalchemy Nov 14, 2018
2f97279
Update vendor file
techalchemy Nov 14, 2018
3585ef1
Merge branch 'maintenance/merge-3191-3196-3209' of github.com:pypa/pi…
techalchemy Nov 14, 2018
ec166f9
Reformat cli and command code
techalchemy Nov 14, 2018
e864343
Merge remote-tracking branch 'devxpy/master' into maintenance/merge-3…
techalchemy Nov 14, 2018
86c894d
Woops, delegator isn't updated, neither packaging
techalchemy Nov 14, 2018
ada66d3
Remove old patch
techalchemy Nov 14, 2018
bfa0b29
Update vendored deps
techalchemy Nov 14, 2018
5e5e1ed
Stray print
techalchemy Nov 14, 2018
08d94d4
Update core and rebuild ci
techalchemy Nov 14, 2018
a8f4c7e
accidental commit
techalchemy Nov 14, 2018
41cbe4d
Pin postreleases to pass packaging ci
techalchemy Nov 14, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions news/2200.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added persistent settings for all CLI flags via ``PIPENV_{FLAG_NAME}`` environment variables by enabling ``auto_envvar_prefix=PIPENV`` in click (implements PEEP-0002).
2 changes: 1 addition & 1 deletion news/2737.bugfix.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Handle non-ASCII characters correctly in TOML.
Non-ascii characters will now be handled correctly when parsed by pipenv's ``ToML`` parsers.
2 changes: 1 addition & 1 deletion news/2983.bugfix.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Pipenv will no longer fail when encountering python versions on Windows that were unintalled.
Pipenv will no longer fail when encountering python versions on Windows that have been uninstalled.
2 changes: 1 addition & 1 deletion news/3041.feature
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--bare now has an effect on clean, and sync's bare option is now used to reduce output.
Added support for ``--bare`` to ``pipenv clean``, and fixed ``pipenv sync --bare`` to actually reduce output.
1 change: 1 addition & 0 deletions news/3061.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated ``pythonfinder`` to correct an issue with unnesting of nested paths when searching for python versions.
2 changes: 1 addition & 1 deletion news/3088.bugfix.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Fixed a bug which caused ``Unexpected EOF`` errors to be thrown when PIP awaited input from users who put login credentials in their environment.
Fixed a bug which caused ``Unexpected EOF`` errors to be thrown when ``pip`` was waiting for input from users who had put login credentials in environment variables.
1 change: 1 addition & 0 deletions news/3096.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fixed a bug which sometimes prevented cloning and parsing ``mercurial`` requirements.
1 change: 1 addition & 0 deletions news/3096.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Added support for python installations managed by ``asdf``.
6 changes: 6 additions & 0 deletions news/3096.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Updated vendored dependencies:
- ``requests 2.19.1 => 2.20.1``
- ``tomlkit 0.4.46 => 0.5.2``
- ``vistir 0.1.6 => 0.2.4``
- ``pythonfinder 1.1.2 => 1.1.8``
- ``requirementslib 1.1.10 => 1.3.0``
2 changes: 1 addition & 1 deletion news/3145.bugfix.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Remote non-PyPI artifacts and local wheels and artifacts will now include their own hashes rather than including hashes from ``PyPI``.
Hashes for remote and local non-PyPI artifacts will now be included in ``Pipfile.lock`` during resolution.
2 changes: 1 addition & 1 deletion news/3170.feature
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Do not show error but success for running pipenv uninstall --all in a fresh virtuanlenv
Do not show error but success for running ``pipenv uninstall --all`` in a fresh virtual environment.
1 change: 1 addition & 0 deletions news/3191.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Switch to ``tomlkit`` for parsing and writing. Drop ``prettytoml`` and ``contoml`` from vendors.
1 change: 1 addition & 0 deletions news/3196.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated ``requirementslib`` to aid in resolution of local and remote archives.
1 change: 1 addition & 0 deletions news/3216.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
When sources are missing names, names will now be derived from the supplied URL.
1 change: 1 addition & 0 deletions news/3217.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improved asynchronous installation and error handling via queued subprocess paralleization.
12 changes: 8 additions & 4 deletions pipenv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from .__version__ import __version__

PIPENV_ROOT = os.path.dirname(os.path.realpath(__file__))
PIPENV_ROOT = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
PIPENV_VENDOR = os.sep.join([PIPENV_ROOT, "vendor"])
PIPENV_PATCHED = os.sep.join([PIPENV_ROOT, "patched"])
# Inject vendored directory into system path.
Expand All @@ -27,11 +27,15 @@
if sys.version_info >= (3, 1) and sys.version_info <= (3, 6):
if sys.stdout.isatty() and sys.stderr.isatty():
import io
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf8')
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf8')
import atexit
stdout_wrapper = io.TextIOWrapper(sys.stdout.buffer, encoding='utf8')
atexit.register(stdout_wrapper.close)
stderr_wrapper = io.TextIOWrapper(sys.stderr.buffer, encoding='utf8')
atexit.register(stderr_wrapper.close)
sys.stdout = stdout_wrapper
sys.stderr = stderr_wrapper

os.environ["PIP_DISABLE_PIP_VERSION_CHECK"] = fs_str("1")
os.environ["PIP_SHIMS_BASE_MODULE"] = fs_str("pipenv.patched.notpip")

# Hack to make things work better.
try:
Expand Down
2 changes: 1 addition & 1 deletion pipenv/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .cli import cli

if __name__ == "__main__":
cli()
cli(auto_envvar_prefix="PIPENV")
33 changes: 14 additions & 19 deletions pipenv/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Exposes a standard API that enables compatibility across python versions,
operating systems, etc.
"""

import functools
import importlib
import io
Expand Down Expand Up @@ -66,21 +67,10 @@ def detach(self):
warnings.filterwarnings("ignore", category=ResourceWarning)


def pip_import(module_path, subimport=None, old_path=None):
internal = "pip._internal.{0}".format(module_path)
old_path = old_path or module_path
pip9 = "pip.{0}".format(old_path)
try:
_tmp = importlib.import_module(internal)
except ImportError:
_tmp = importlib.import_module(pip9)
if subimport:
return getattr(_tmp, subimport, _tmp)
return _tmp


class TemporaryDirectory(object):
"""Create and return a temporary directory. This has the same

"""
Create and return a temporary directory. This has the same
behavior as mkdtemp but can be used as a context manager. For
example:

Expand Down Expand Up @@ -146,9 +136,11 @@ def _sanitize_params(prefix, suffix, dir):


class _TemporaryFileCloser:
"""A separate object allowing proper closing of a temporary file's
"""
A separate object allowing proper closing of a temporary file's
underlying file object, without adding a __del__ method to the
temporary file."""
temporary file.
"""

file = None # Set here since __del__ checks it
close_called = False
Expand Down Expand Up @@ -192,7 +184,9 @@ def close(self):


class _TemporaryFileWrapper:
"""Temporary file wrapper

"""
Temporary file wrapper
This class provides a wrapper around files opened for
temporary use. In particular, it seeks to automatically
remove the file when it is no longer needed.
Expand Down Expand Up @@ -268,7 +262,8 @@ def NamedTemporaryFile(
dir=None,
delete=True,
):
"""Create and return a temporary file.
"""
Create and return a temporary file.
Arguments:
'prefix', 'suffix', 'dir' -- as for mkstemp.
'mode' -- the mode argument to io.open (default "w+b").
Expand Down Expand Up @@ -382,7 +377,7 @@ def decode_output(output):
except (AttributeError, UnicodeDecodeError, UnicodeEncodeError):
if six.PY2:
output = unicode.translate(vistir.misc.to_text(output),
UNICODE_TO_ASCII_TRANSLATION_MAP)
UNICODE_TO_ASCII_TRANSLATION_MAP)
else:
output = output.translate(UNICODE_TO_ASCII_TRANSLATION_MAP)
output = output.encode(DEFAULT_ENCODING, "replace")
Expand Down
3 changes: 1 addition & 2 deletions pipenv/cli/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,13 @@ def uninstall(
):
"""Un-installs a provided package and removes it from Pipfile."""
from ..core import do_uninstall

retcode = do_uninstall(
packages=state.installstate.packages,
editable_packages=state.installstate.editables,
three=state.three,
python=state.python,
system=state.system,
lock=not skip_lock,
lock=not state.installstate.skip_lock,
all_dev=all_dev,
all=all,
keep_outdated=state.installstate.keep_outdated,
Expand Down
71 changes: 36 additions & 35 deletions pipenv/cli/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def callback(ctx, param, value):
state.index = value
return value
return option('-i', '--index', expose_value=False, envvar="PIP_INDEX_URL",
help='Target PyPI-compatible package index url.', nargs=1,
callback=callback)(f)
help='Target PyPI-compatible package index url.', nargs=1,
callback=callback)(f)


def extra_index_option(f):
Expand All @@ -96,8 +96,8 @@ def callback(ctx, param, value):
state.extra_index_urls.extend(list(value))
return value
return option("--extra-index-url", multiple=True, expose_value=False,
help=u"URLs to the extra PyPI compatible indexes to query for package lookups.",
callback=callback, envvar="PIP_EXTRA_INDEX_URL")(f)
help=u"URLs to the extra PyPI compatible indexes to query for package lookups.",
callback=callback, envvar="PIP_EXTRA_INDEX_URL")(f)


def editable_option(f):
Expand All @@ -106,8 +106,8 @@ def callback(ctx, param, value):
state.installstate.editables.extend(value)
return value
return option('-e', '--editable', expose_value=False, multiple=True,
help='An editable python package URL or path, often to a VCS repo.',
callback=callback)(f)
help='An editable python package URL or path, often to a VCS repo.',
callback=callback, type=click.types.STRING)(f)


def sequential_option(f):
Expand All @@ -116,8 +116,8 @@ def callback(ctx, param, value):
state.installstate.sequential = value
return value
return option("--sequential", is_flag=True, default=False, expose_value=False,
help="Install dependencies one-at-a-time, instead of concurrently.",
callback=callback, type=click.types.BOOL)(f)
help="Install dependencies one-at-a-time, instead of concurrently.",
callback=callback, type=click.types.BOOL)(f)


def skip_lock_option(f):
Expand All @@ -126,8 +126,8 @@ def callback(ctx, param, value):
state.installstate.skip_lock = value
return value
return option("--skip-lock", is_flag=True, default=False, expose_value=False,
help=u"Skip locking mechanisms and use the Pipfile instead during operation.",
callback=callback, type=click.types.BOOL)(f)
help=u"Skip locking mechanisms and use the Pipfile instead during operation.",
envvar="PIPENV_SKIP_LOCK", callback=callback, type=click.types.BOOL)(f)


def keep_outdated_option(f):
Expand All @@ -136,8 +136,8 @@ def callback(ctx, param, value):
state.installstate.keep_outdated = value
return value
return option("--keep-outdated", is_flag=True, default=False, expose_value=False,
help=u"Keep out-dated dependencies from being updated in Pipfile.lock.",
callback=callback, type=click.types.BOOL)(f)
help=u"Keep out-dated dependencies from being updated in Pipfile.lock.",
callback=callback, type=click.types.BOOL)(f)


def selective_upgrade_option(f):
Expand All @@ -146,8 +146,8 @@ def callback(ctx, param, value):
state.installstate.selective_upgrade = value
return value
return option("--selective-upgrade", is_flag=True, default=False, type=click.types.BOOL,
help="Update specified packages.", callback=callback,
expose_value=False)(f)
help="Update specified packages.", callback=callback,
expose_value=False)(f)


def ignore_pipfile_option(f):
Expand All @@ -156,8 +156,8 @@ def callback(ctx, param, value):
state.installstate.ignore_pipfile = value
return value
return option("--ignore-pipfile", is_flag=True, default=False, expose_value=False,
help="Ignore Pipfile when installing, using the Pipfile.lock.",
callback=callback)(f)
help="Ignore Pipfile when installing, using the Pipfile.lock.",
callback=callback, type=click.types.BOOL)(f)


def dev_option(f):
Expand All @@ -166,8 +166,8 @@ def callback(ctx, param, value):
state.installstate.dev = value
return value
return option("--dev", "-d", is_flag=True, default=False, type=click.types.BOOL,
help="Install both develop and default packages.", callback=callback,
expose_value=False)(f)
help="Install both develop and default packages.", callback=callback,
expose_value=False)(f)


def pre_option(f):
Expand All @@ -176,15 +176,16 @@ def callback(ctx, param, value):
state.installstate.pre = value
return value
return option("--pre", is_flag=True, default=False, help=u"Allow pre-releases.",
callback=callback, type=click.types.BOOL, expose_value=False)(f)
callback=callback, type=click.types.BOOL, expose_value=False)(f)


def package_arg(f):
def callback(ctx, param, value):
state = ctx.ensure_object(State)
state.installstate.packages.extend(value)
return value
return argument('packages', nargs=-1, callback=callback, expose_value=False,)(f)
return argument('packages', nargs=-1, callback=callback, expose_value=False,
type=click.types.STRING)(f)


def three_option(f):
Expand All @@ -195,8 +196,8 @@ def callback(ctx, param, value):
state.two = not value
return value
return option("--three/--two", is_flag=True, default=None,
help="Use Python 3/2 when creating virtualenv.", callback=callback,
expose_value=False)(f)
help="Use Python 3/2 when creating virtualenv.", callback=callback,
expose_value=False)(f)


def python_option(f):
Expand All @@ -206,8 +207,8 @@ def callback(ctx, param, value):
state.python = validate_python_path(ctx, param, value)
return value
return option("--python", default=False, nargs=1, callback=callback,
help="Specify which version of Python virtualenv should use.",
expose_value=False)(f)
help="Specify which version of Python virtualenv should use.",
expose_value=False)(f)


def pypi_mirror_option(f):
Expand All @@ -217,7 +218,7 @@ def callback(ctx, param, value):
state.pypi_mirror = validate_pypi_mirror(ctx, param, value)
return value
return option("--pypi-mirror", default=environments.PIPENV_PYPI_MIRROR, nargs=1,
callback=callback, help="Specify a PyPI mirror.", expose_value=False)(f)
callback=callback, help="Specify a PyPI mirror.", expose_value=False)(f)


def verbose_option(f):
Expand All @@ -227,7 +228,7 @@ def callback(ctx, param, value):
state.verbose = True
setup_verbosity(ctx, param, value)
return option("--verbose", "-v", is_flag=True, expose_value=False,
callback=callback, help="Verbose mode.")(f)
callback=callback, help="Verbose mode.", type=click.types.BOOL)(f)


def site_packages_option(f):
Expand All @@ -236,8 +237,8 @@ def callback(ctx, param, value):
state.site_packages = value
return value
return option("--site-packages", is_flag=True, default=False, type=click.types.BOOL,
help="Enable site-packages for the virtualenv.", callback=callback,
expose_value=False)(f)
help="Enable site-packages for the virtualenv.", callback=callback,
expose_value=False)(f)


def clear_option(f):
Expand All @@ -246,8 +247,8 @@ def callback(ctx, param, value):
state.clear = value
return value
return option("--clear", is_flag=True, callback=callback, type=click.types.BOOL,
help="Clears caches (pipenv, pip, and pip-tools).",
expose_value=False)(f)
help="Clears caches (pipenv, pip, and pip-tools).",
expose_value=False)(f)


def system_option(f):
Expand All @@ -257,7 +258,7 @@ def callback(ctx, param, value):
state.system = value
return value
return option("--system", is_flag=True, default=False, help="System pip management.",
callback=callback, type=click.types.BOOL, expose_value=False)(f)
callback=callback, type=click.types.BOOL, expose_value=False)(f)


def requirementstxt_option(f):
Expand All @@ -267,7 +268,7 @@ def callback(ctx, param, value):
state.installstate.requirementstxt = value
return value
return option("--requirements", "-r", nargs=1, default=False, expose_value=False,
help="Import a requirements.txt file.", callback=callback)(f)
help="Import a requirements.txt file.", callback=callback)(f)


def requirements_flag(f):
Expand All @@ -277,7 +278,7 @@ def callback(ctx, param, value):
state.installstate.requirementstxt = value
return value
return option("--requirements", "-r", default=False, is_flag=True, expose_value=False,
help="Generate output in requirements.txt format.", callback=callback)(f)
help="Generate output in requirements.txt format.", callback=callback)(f)


def code_option(f):
Expand All @@ -296,8 +297,8 @@ def callback(ctx, param, value):
state.installstate.deploy = value
return value
return option("--deploy", is_flag=True, default=False, type=click.types.BOOL,
help=u"Abort if the Pipfile.lock is out-of-date, or Python version is"
" wrong.", callback=callback, expose_value=False)(f)
help=u"Abort if the Pipfile.lock is out-of-date, or Python version is"
" wrong.", callback=callback, expose_value=False)(f)


def setup_verbosity(ctx, param, value):
Expand Down
Loading