Issue description
pipenv sync --sequential may silently fail to install a package.
pipenv sync --sequential -v doesn't emit verbose logs of any pip install invocations but the first.
Fixed in #3537.
Expected result
An error:
[user@dev repro]$ ../.venv/bin/pipenv sync --sequential
Creating a virtualenv for this project…
Pipfile: /home/user/pipenv/repro/Pipfile
Using /home/user/pipenv/.venv/bin/python3 (3.7.2) to create virtualenv…
⠇ Creating virtual environment...Already using interpreter /home/user/pipenv/.venv/bin/python3
Using base prefix '/usr'
New python executable in /home/user/pipenv/repro/.venv/bin/python3
Also creating executable in /home/user/pipenv/repro/.venv/bin/python
Installing setuptools, pip, wheel...
done.
✔ Successfully created virtual environment!
Virtualenv location: /home/user/pipenv/repro/.venv
Installing dependencies from Pipfile.lock (63bec0)…
An error occurred while installing requests==2.21.0 --hash=sha256:0000000000000000000000000000000000000000000000000000000000000000! Will try again.
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 5/5 — 00:00:03
Installing initially failed dependencies…
[pipenv.exceptions.InstallError]: File "/home/user/pipenv/pipenv/core.py", line 2599, in do_sync
[pipenv.exceptions.InstallError]: system=system,
[pipenv.exceptions.InstallError]: File "/home/user/pipenv/pipenv/core.py", line 1228, in do_init
[pipenv.exceptions.InstallError]: pypi_mirror=pypi_mirror,
[pipenv.exceptions.InstallError]: File "/home/user/pipenv/pipenv/core.py", line 834, in do_install_dependencies
[pipenv.exceptions.InstallError]: retry_list, procs, failed_deps_queue, requirements_dir, **install_kwargs
[pipenv.exceptions.InstallError]: File "/home/user/pipenv/pipenv/core.py", line 740, in batch_install
[pipenv.exceptions.InstallError]: _cleanup_procs(procs, failed_deps_queue, retry=retry)
[pipenv.exceptions.InstallError]: File "/home/user/pipenv/pipenv/core.py", line 661, in _cleanup_procs
[pipenv.exceptions.InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: ['Collecting requests==2.21.0 (from -r /tmp/pipenv-4aqevpfx-requirements/pipenv-zu00lfak-requirement.txt (line 1))', ' Using cached https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl']
[pipenv.exceptions.InstallError]: ['THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.', ' requests==2.21.0 from https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl#sha256=7bf2a778576d825600030a110f3c0e3e8edc51dfaafe1c146e39a2027784957b (from -r /tmp/pipenv-4aqevpfx-requirements/pipenv-zu00lfak-requirement.txt (line 1)):', ' Expected sha256 0000000000000000000000000000000000000000000000000000000000000000', ' Got 7bf2a778576d825600030a110f3c0e3e8edc51dfaafe1c146e39a2027784957b']
ERROR: ERROR: Package installation failed...
☤ ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/1 — 00:00:00
Actual result
Silent failure to install requests:
[user@dev repro]$ ../.venv/bin/pipenv sync --sequential
Creating a virtualenv for this project…
Pipfile: /home/user/pipenv/repro/Pipfile
Using /home/user/pipenv/.venv/bin/python3 (3.7.2) to create virtualenv…
⠧ Creating virtual environment...Already using interpreter /home/user/pipenv/.venv/bin/python3
Using base prefix '/usr'
New python executable in /home/user/pipenv/repro/.venv/bin/python3
Also creating executable in /home/user/pipenv/repro/.venv/bin/python
Installing setuptools, pip, wheel...
done.
✔ Successfully created virtual environment!
Virtualenv location: /home/user/pipenv/repro/.venv
Installing dependencies from Pipfile.lock (63bec0)…
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 5/5 — 00:00:04
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
All dependencies are now up-to-date!
[user@dev repro]$ ../.venv/bin/pipenv run pip list
Package Version
---------- ----------
certifi 2018.11.29
chardet 3.0.4
idna 2.8
pip 19.0.3
setuptools 40.8.0
urllib3 1.24.1
wheel 0.33.1
Steps to replicate
Cause a hash mismatch one of the packages.
"requests": {
"hashes": [
"sha256:0000000000000000000000000000000000000000000000000000000000000000"
],
Run pipenv sync --sequential.
$ pipenv --support
Pipenv version: '2018.11.27.dev0'
Pipenv location: '/home/user/pipenv/pipenv'
Python location: '/home/user/pipenv/.venv/bin/python3'
Python installations found:
3.7.2: /usr/bin/python3.7m
3.7.2: /usr/bin/python3.7
3.5.2: /home/user/.pyenv/versions/3.5.2/bin/python
3.5.2: /home/user/.pyenv/versions/3.5.2/bin/python3.5m
2.7.15: /usr/bin/python
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.7.2',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '4.14.74-1.pvops.qubes.x86_64',
'platform_system': 'Linux',
'platform_version': '#1 SMP Mon Oct 8 17:14:24 UTC 2018',
'python_full_version': '3.7.2',
'python_version': '3.7',
'sys_platform': 'linux'}
System environment variables:
QUBES_KEYMAP
LS_COLORS
QREXEC_SERVICE_ARGUMENT
LANG
HISTCONTROL
DISPLAY
HOSTNAME
PYENV_ROOT
OLDPWD
COLORTERM
XDG_VTNR
SSH_AUTH_SOCK
QT_X11_NO_MITSHM
XDG_SESSION_ID
QUBES_ENV_SOURCED
USER
VMTYPE
GNOME_TERMINAL_SCREEN
UPDTYPE
PWD
QREXEC_AGENT_PID
HOME
SSH_AGENT_PID
QUBES_USER_KEYMAP
XDG_DATA_DIRS
MAIL
WINDOWPATH
SHELL
TERM
VTE_VERSION
QREXEC_SERVICE_FULL_NAME
QREXEC_REMOTE_DOMAIN
XDG_SESSION_CLASS
GNOME_TERMINAL_SERVICE
XDG_SEAT
SHLVL
PYENV_SHELL
GNOME_DESKTOP_SESSION_ID
LOGNAME
DBUS_SESSION_BUS_ADDRESS
XDG_RUNTIME_DIR
PATH
PS1
HISTSIZE
LESSOPEN
_
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PIP_SHIMS_BASE_MODULE
PIP_PYTHON_PATH
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH: /home/user/.local/bin:/home/user/bin:/home/user/.cargo/bin:/home/user/.cargo/bin:/home/user/.pyenv/shims:/home/user/.pyenv/bin:/home/user/.cargo/bin:/home/user/.local/bin:/home/user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
SHELL: /bin/bash
LANG: C.UTF-8
PWD: /home/user/pipenv/repro
Contents of Pipfile ('/home/user/pipenv/repro/Pipfile'):
[packages]
requests = "*"
Contents of Pipfile.lock ('/home/user/pipenv/repro/Pipfile.lock'):
{
"_meta": {
"hash": {
"sha256": "70e8bf6bc774f5ca177467cab4e67d4264d0536857993326abc13ff43063bec0"
},
"pipfile-spec": 6,
"requires": {},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {
"certifi": {
"hashes": [
"sha256:47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7",
"sha256:993f830721089fef441cdfeb4b2c8c9df86f0c63239f06bd025a76a7daddb033"
],
"version": "==2018.11.29"
},
"chardet": {
"hashes": [
"sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
"sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
],
"version": "==3.0.4"
},
"idna": {
"hashes": [
"sha256:c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407",
"sha256:ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c"
],
"version": "==2.8"
},
"requests": {
"hashes": [
"sha256:0000000000000000000000000000000000000000000000000000000000000000"
],
"index": "pypi",
"version": "==2.21.0"
},
"urllib3": {
"hashes": [
"sha256:61bf29cada3fc2fbefad4fdf059ea4bd1b4a86d2b6d15e1c7c0b582b9752fe39",
"sha256:de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22"
],
"version": "==1.24.1"
}
},
"develop": {}
}
Issue description
pipenv sync --sequentialmay silently fail to install a package.pipenv sync --sequential -vdoesn't emit verbose logs of anypip installinvocations but the first.Fixed in #3537.
Expected result
An error:
Actual result
Silent failure to install
requests:Steps to replicate
Cause a hash mismatch one of the packages.
Run
pipenv sync --sequential.$ pipenv --support
Pipenv version:
'2018.11.27.dev0'Pipenv location:
'/home/user/pipenv/pipenv'Python location:
'/home/user/pipenv/.venv/bin/python3'Python installations found:
3.7.2:/usr/bin/python3.7m3.7.2:/usr/bin/python3.73.5.2:/home/user/.pyenv/versions/3.5.2/bin/python3.5.2:/home/user/.pyenv/versions/3.5.2/bin/python3.5m2.7.15:/usr/bin/pythonPEP 508 Information:
System environment variables:
QUBES_KEYMAPLS_COLORSQREXEC_SERVICE_ARGUMENTLANGHISTCONTROLDISPLAYHOSTNAMEPYENV_ROOTOLDPWDCOLORTERMXDG_VTNRSSH_AUTH_SOCKQT_X11_NO_MITSHMXDG_SESSION_IDQUBES_ENV_SOURCEDUSERVMTYPEGNOME_TERMINAL_SCREENUPDTYPEPWDQREXEC_AGENT_PIDHOMESSH_AGENT_PIDQUBES_USER_KEYMAPXDG_DATA_DIRSMAILWINDOWPATHSHELLTERMVTE_VERSIONQREXEC_SERVICE_FULL_NAMEQREXEC_REMOTE_DOMAINXDG_SESSION_CLASSGNOME_TERMINAL_SERVICEXDG_SEATSHLVLPYENV_SHELLGNOME_DESKTOP_SESSION_IDLOGNAMEDBUS_SESSION_BUS_ADDRESSXDG_RUNTIME_DIRPATHPS1HISTSIZELESSOPEN_PIP_DISABLE_PIP_VERSION_CHECKPYTHONDONTWRITEBYTECODEPIP_SHIMS_BASE_MODULEPIP_PYTHON_PATHPYTHONFINDER_IGNORE_UNSUPPORTEDPipenv–specific environment variables:
Debug–specific environment variables:
PATH:/home/user/.local/bin:/home/user/bin:/home/user/.cargo/bin:/home/user/.cargo/bin:/home/user/.pyenv/shims:/home/user/.pyenv/bin:/home/user/.cargo/bin:/home/user/.local/bin:/home/user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/binSHELL:/bin/bashLANG:C.UTF-8PWD:/home/user/pipenv/reproContents of
Pipfile('/home/user/pipenv/repro/Pipfile'):Contents of
Pipfile.lock('/home/user/pipenv/repro/Pipfile.lock'):{ "_meta": { "hash": { "sha256": "70e8bf6bc774f5ca177467cab4e67d4264d0536857993326abc13ff43063bec0" }, "pipfile-spec": 6, "requires": {}, "sources": [ { "name": "pypi", "url": "https://pypi.org/simple", "verify_ssl": true } ] }, "default": { "certifi": { "hashes": [ "sha256:47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7", "sha256:993f830721089fef441cdfeb4b2c8c9df86f0c63239f06bd025a76a7daddb033" ], "version": "==2018.11.29" }, "chardet": { "hashes": [ "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae", "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691" ], "version": "==3.0.4" }, "idna": { "hashes": [ "sha256:c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407", "sha256:ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c" ], "version": "==2.8" }, "requests": { "hashes": [ "sha256:0000000000000000000000000000000000000000000000000000000000000000" ], "index": "pypi", "version": "==2.21.0" }, "urllib3": { "hashes": [ "sha256:61bf29cada3fc2fbefad4fdf059ea4bd1b4a86d2b6d15e1c7c0b582b9752fe39", "sha256:de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22" ], "version": "==1.24.1" } }, "develop": {} }