pipenv install --dev of following Pipfile will raise pipenv.vendor.plette.models.base.ValidationError: {u'python_full_version': u'3.6.3', u'python_version': u'3.6'}
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[requires]
python_version = "3.6"
python_full_version = "3.6.3"
[dev-packages]
requests = "*"
Here is the full output of the error.
➜ test pipenv install --dev
Pipfile.lock (470172) out of date, updating to (8bdc9e)...
Locking [dev-packages] dependencies...
✔ Success!
Locking [packages] dependencies...
Updated Pipfile.lock (470172)!
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 11, in <module>
load_entry_point('pipenv', 'console_scripts', 'pipenv')()
File "/home/user/Documents/dev/pipenv/pipenv/vendor/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/user/Documents/dev/pipenv/pipenv/vendor/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/user/Documents/dev/pipenv/pipenv/vendor/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/user/Documents/dev/pipenv/pipenv/vendor/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/user/Documents/dev/pipenv/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/user/Documents/dev/pipenv/pipenv/vendor/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/user/Documents/dev/pipenv/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/user/Documents/dev/pipenv/pipenv/vendor/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/user/Documents/dev/pipenv/pipenv/cli/command.py", line 249, in install
editable_packages=state.installstate.editables,
File "/home/user/Documents/dev/pipenv/pipenv/core.py", line 2023, in do_install
skip_lock=skip_lock,
File "/home/user/Documents/dev/pipenv/pipenv/core.py", line 1280, in do_init
pypi_mirror=pypi_mirror,
File "/home/user/Documents/dev/pipenv/pipenv/core.py", line 735, in do_install_dependencies
lockfile = project.get_or_create_lockfile()
File "/home/user/Documents/dev/pipenv/pipenv/project.py", line 813, in get_or_create_lockfile
_created_lockfile = Lockfile(lockfile_dict)
File "/home/user/Documents/dev/pipenv/pipenv/vendor/plette/models/base.py", line 37, in __init__
self.validate(data)
File "/home/user/Documents/dev/pipenv/pipenv/vendor/plette/lockfiles.py", line 80, in validate
klass.validate(data[key])
File "/home/user/Documents/dev/pipenv/pipenv/vendor/plette/models/sections.py", line 70, in validate
klass.validate(data[key])
File "/home/user/Documents/dev/pipenv/pipenv/vendor/plette/models/base.py", line 67, in validate
return validate(cls, data)
File "/home/user/Documents/dev/pipenv/pipenv/vendor/plette/models/base.py", line 27, in validate
raise ValidationError(data, v)
pipenv.vendor.plette.models.base.ValidationError: {u'python_full_version': u'3.6.3', u'python_version': u'3.6'}
$ pipenv --support
Pipenv version: '2018.10.14.dev0'
Pipenv location: '/home/user/Documents/dev/pipenv/pipenv'
Python location: '/usr/bin/python'
Python installations found:
3.6.5: /home/user/.pyenv/versions/3.6.5/bin/python3.6m3.6.6: /home/user/.pyenv/versions/3.6.6/bin/python32.7.15: /home/user/.pyenv/versions/2.7.15/bin/python2.73.6.4: /home/user/.pyenv/versions/3.6.4/bin/python3.6m3.6.5: /home/user/.pyenv/versions/3.6.5/bin/python3.63.6.6: /home/user/.pyenv/versions/3.6.6/bin/python3.6m3.5.2: /usr/bin/python3.5m3.5.5: /home/user/.pyenv/versions/3.5.5/bin/python3.5m3.6.4: /home/user/.pyenv/versions/3.6.4/bin/python3.62.7.14: /home/user/.pyenv/versions/2.7.14/bin/python2.73.6.3: /home/user/.pyenv/versions/3.6.3/bin/python33.5.5: /home/user/.pyenv/versions/3.5.5/bin/python2.7.12: /usr/bin/python3.6.3: /home/user/.pyenv/versions/3.6.3/bin/python3.6m3.5.2: /usr/bin/python3.5PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '0',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '4.15.0-38-generic',
'platform_system': 'Linux',
'platform_version': '#41~16.04.1-Ubuntu SMP Wed Oct 10 20:16:04 UTC 2018',
'python_full_version': '2.7.12',
'python_version': '2.7',
'sys_platform': 'linux2'}
System environment variables:
LESSUPSTART_EVENTSPYTHONDONTWRITEBYTECODEXDG_SESSION_TYPELC_PAPERSHELLPYENV_SHELLXDG_DATA_DIRSMANDATORY_PATHTERMINATOR_UUIDQT_ACCESSIBILITYNVM_BINUPSTART_INSTANCEJOBXMODIFIERSJAVA_HOMEGTK2_MODULESXDG_RUNTIME_DIRLC_ADDRESSLC_CTYPEPYTHONFINDER_IGNORE_UNSUPPORTEDXDG_SESSION_IDDBUS_SESSION_BUS_ADDRESSORBIT_SOCKETDIRDEFAULTS_PATHDESKTOP_SESSIONGTK_MODULESPIP_DISABLE_PIP_VERSION_CHECKINSTANCELC_NAMELS_COLORSLC_NUMERICGNOME_DESKTOP_SESSION_IDXDG_CURRENT_DESKTOPUSERXDG_VTNRPYENV_VIRTUALENV_INITXAUTHORITYLANGUAGELC_MEASUREMENTQT_QPA_PLATFORMTHEMECLUTTER_IM_MODULEWINDOWIDGPG_AGENT_INFOLANGGDMSESSIONUPSTART_JOBXDG_SEAT_PATHPIP_PYTHON_PATH_GTK_IM_MODULEXDG_CONFIG_DIRSQT_VERSIONCOLORTERMLC_TIMEPAGERXDG_GREETER_DATA_DIRQT4_IM_MODULENVM_DIRHOMEDISPLAYXDG_SESSION_DESKTOPQT_DIRCONDA_SHLVLLC_MONETARYQT_LINUX_ACCESSIBILITY_ALWAYS_ONGOPATHLC_IDENTIFICATIONUPSTART_SESSIONIBUS_DISABLE_SNOOPERGNOME_KEYRING_PIDNVM_CD_FLAGSQT_IM_MODULELOGNAMEXDG_SEATPATHGNOME_KEYRING_CONTROLZSHTERMXDG_SESSION_PATHCOMPIZ_CONFIG_PROFILESESSIONTYPEIM_CONFIG_PHASEPIP_SHIMS_BASE_MODULESSH_AUTH_SOCKLSCOLORSOLDPWDGDM_LANGLC_TELEPHONESHLVLPWDPipenv–specific environment variables:
Debug–specific environment variables:
PATH: /home/user/.nvm/versions/node/v10.11.0/bin:/home/user/.pyenv/plugins/pyenv-virtualenv/shims:/home/user/.pyenv/shims:/home/user/.pyenv/bin:/home/user/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/home/user/go/bin:/home/user/jdk1.8.0_171/bin:/home/user/apache-maven-3.5.3/bin:/home/user/flutter/binSHELL: /usr/bin/zshLANG: en_US.UTF-8PWD: /home/user/Documents/dev/testContents of Pipfile ('/home/user/Documents/dev/test/Pipfile'):
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[requires]
python_version = "3.6"
python_full_version = "3.6.3"
[dev-packages]
requests = "*"
Contents of Pipfile.lock ('/home/user/Documents/dev/test/Pipfile.lock'):
{
"_meta": {
"hash": {
"sha256": "ff359a6f462a364a9274c6cbc1c35332d85a5215b20a840b432ec1e2f5470172"
},
"pipfile-spec": 6,
"requires": {
"python_full_version": "3.6.3",
"python_version": "3.6"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {},
"develop": {
"certifi": {
"hashes": [
"sha256:339dc09518b07e2fa7eda5450740925974815557727d6bd35d319c1524a04a4c",
"sha256:6d58c986d22b038c8c0df30d639f23a3e6d172a05c3583e766f4c0b785c0986a"
],
"version": "==2018.10.15"
},
"chardet": {
"hashes": [
"sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
"sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
],
"version": "==3.0.4"
},
"idna": {
"hashes": [
"sha256:156a6814fb5ac1fc6850fb002e0852d56c0c8d2531923a51032d1b70760e186e",
"sha256:684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16"
],
"version": "==2.7"
},
"requests": {
"hashes": [
"sha256:99dcfdaaeb17caf6e526f32b6a7b780461512ab3f1d992187801694cba42770c",
"sha256:a84b8c9ab6239b578f22d1c21d51b696dcfe004032bb80ea832398d6909d7279"
],
"index": "pypi",
"version": "==2.20.0"
},
"urllib3": {
"hashes": [
"sha256:61bf29cada3fc2fbefad4fdf059ea4bd1b4a86d2b6d15e1c7c0b582b9752fe39",
"sha256:de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22"
],
"version": "==1.24.1"
}
}
}
You can only pick one of python_version or python_full_version so the validation error is correct, your pipfile violates the spec we made up for pipfiles :)
On a more serious note I am ok with overriding the validation, I guess we should pick the more specific one
Oh, I didn't check the spec doc recently. But I'm sure the older version of pipenv (any released ones) does not have this issue since I used this format in my project for a while. The released pipenv will take the more specific one as the requires. Using git bisect, I found this breaking change is introduced in https://github.com/pypa/pipenv/commit/4c8617237ccdf53bcf87607479afbd9e8cee99bb.
This change may break the compatibility with legacy Pipfiles. How about supporting both of them and only use the more specific one when they both existed?
Or I'm also fine with only supporting existence of only one of them, only if there is updated document reflecting this. So users like me won't get confused. :D
But in personal I prefer the former approach, since supporting both of them have better compatibilities and that does not change the Pipfile spec actually.
Seems like the change have been issued recently as mentioned by @jxltom as it breaks my CI builds as of the moment.
Most helpful comment
Oh, I didn't check the spec doc recently. But I'm sure the older version of pipenv (any released ones) does not have this issue since I used this format in my project for a while. The released pipenv will take the more specific one as the requires. Using
git bisect, I found this breaking change is introduced in https://github.com/pypa/pipenv/commit/4c8617237ccdf53bcf87607479afbd9e8cee99bb.This change may break the compatibility with legacy Pipfiles. How about supporting both of them and only use the more specific one when they both existed?
Or I'm also fine with only supporting existence of only one of them, only if there is updated document reflecting this. So users like me won't get confused. :D
But in personal I prefer the former approach, since supporting both of them have better compatibilities and that does not change the Pipfile spec actually.