Repository navigation
Closed
Labels
Category: Dependency ResolutionIssue relates to dependency resolution.Issue relates to dependency resolution.Type: RegressionThis issue is a regression of a previous behavior.This issue is a regression of a previous behavior.
Description
Issue description
When trying to lock the dependencies for my project, it fails with this error
pipenv.exceptions.DependencyConflict: ERROR: Cannot resolve conflicting version django<3.0,>=2.2.9 while django==3.1.3 is locked.
even though Django 3.1 is not used in the project
Expected result
pipenv lock to succeed
Actual result
$ pipenv lock --verbose
Locking [dev-packages] dependencies...
Building requirements...
Resolving dependencies...
⠋ Locking...
ROUND 1
✘ Locking Failed!
Current constraints:
django-debug-toolbar (from -r /tmp/pipenv_gy3sdfkrequirements/pipenv-4p6znxo8-constraints.txt (line 2))
Finding the best candidates:
found candidate django-debug-toolbar==3.1.1 (constraint was <any>)
Finding secondary dependencies:
django-debug-toolbar==3.1.1 requires django>=2.2, sqlparse>=0.2.0
New dependencies found in this round:
adding ['django', '>=2.2', '[]']
adding ['sqlparse', '>=0.2.0', '[]']
Removed dependencies in this round:
------------------------------------------------------------
Result of round 1: not stable
ROUND 2
Current constraints:
django>=2.2 (from django-debug-toolbar==3.1.1->-r /tmp/pipenv_gy3sdfkrequirements/pipenv-4p6znxo8-constraints.txt (line 2))
django-debug-toolbar (from -r /tmp/pipenv_gy3sdfkrequirements/pipenv-4p6znxo8-constraints.txt (line 2))
sqlparse>=0.2.0 (from django-debug-toolbar==3.1.1->-r /tmp/pipenv_gy3sdfkrequirements/pipenv-4p6znxo8-constraints.txt (line 2))
Finding the best candidates:
found candidate django==3.1.3 (constraint was >=2.2)
found candidate django-debug-toolbar==3.1.1 (constraint was <any>)
found candidate sqlparse==0.4.1 (constraint was >=0.2.0)
Finding secondary dependencies:
django-debug-toolbar==3.1.1 requires django>=2.2, sqlparse>=0.2.0
django==3.1.3 requires asgiref<4,>=3.2.10, pytz, sqlparse>=0.2.2
sqlparse==0.4.1 requires -
New dependencies found in this round:
adding ['asgiref', '<4,>=3.2.10', '[]']
adding ['pytz', '', '[]']
adding ['sqlparse', '>=0.2.0,>=0.2.2', '[]']
Removed dependencies in this round:
removing ['sqlparse', '>=0.2.0', '[]']
------------------------------------------------------------
Result of round 2: not stable
ROUND 3
Current constraints:
asgiref<4,>=3.2.10 (from django==3.1.3->django-debug-toolbar==3.1.1->-r /tmp/pipenv_gy3sdfkrequirements/pipenv-4p6znxo8-constraints.txt (line 2))
django>=2.2 (from django-debug-toolbar==3.1.1->-r /tmp/pipenv_gy3sdfkrequirements/pipenv-4p6znxo8-constraints.txt (line 2))
django-debug-toolbar (from -r /tmp/pipenv_gy3sdfkrequirements/pipenv-4p6znxo8-constraints.txt (line 2))
pytz (from django==3.1.3->django-debug-toolbar==3.1.1->-r /tmp/pipenv_gy3sdfkrequirements/pipenv-4p6znxo8-constraints.txt (line 2))
sqlparse>=0.2.0,>=0.2.2 (from django-debug-toolbar==3.1.1->-r /tmp/pipenv_gy3sdfkrequirements/pipenv-4p6znxo8-constraints.txt (line 2))
Finding the best candidates:
found candidate asgiref==3.3.1 (constraint was >=3.2.10,<4)
found candidate django==3.1.3 (constraint was >=2.2)
found candidate django-debug-toolbar==3.1.1 (constraint was <any>)
found candidate pytz==2020.4 (constraint was <any>)
found candidate sqlparse==0.4.1 (constraint was >=0.2.0,>=0.2.2)
Finding secondary dependencies:
asgiref==3.3.1 requires -
django==3.1.3 requires asgiref<4,>=3.2.10, pytz, sqlparse>=0.2.2
django-debug-toolbar==3.1.1 requires django>=2.2, sqlparse>=0.2.0
sqlparse==0.4.1 requires -
pytz==2020.4 requires -
------------------------------------------------------------
Result of round 3: stable, done
Generating hashes:
asgiref
django
django-debug-toolbar
sqlparse
pytz
Tried constraint: <InstallRequirement object: django<3.0,>=2.2.9 editable=False>
Traceback (most recent call last):
File "/home/kususer/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 763, in <module>
main()
File "/home/kususer/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 759, in main
parsed.requirements_dir, parsed.packages, parse_only=parsed.parse_only)
File "/home/kususer/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 741, in _main
resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages)
File "/home/kususer/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 714, in resolve_packages
results = clean_results(results, resolver, project)
File "/home/kususer/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 596, in clean_results
entry_dict = translate_markers(entry.get_cleaned_dict(keep_outdated=False))
File "/home/kususer/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 239, in get_cleaned_dict
self.validate_constraints()
File "/home/kususer/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 536, in validate_constraints
raise DependencyConflict(msg)
pipenv.exceptions.DependencyConflict: ERROR: Cannot resolve conflicting version django<3.0,>=2.2.9 while django==3.1.3 is locked.
ROUND 1
Current constraints:
django-debug-toolbar (from -r /tmp/pipenv_gy3sdfkrequirements/pipenv-4p6znxo8-constraints.txt (line 2))
Finding the best candidates:
found candidate django-debug-toolbar==3.1.1 (constraint was <any>)
Finding secondary dependencies:
django-debug-toolbar==3.1.1 requires django>=2.2, sqlparse>=0.2.0
New dependencies found in this round:
adding ['django', '>=2.2', '[]']
adding ['sqlparse', '>=0.2.0', '[]']
Removed dependencies in this round:
------------------------------------------------------------
Result of round 1: not stable
ROUND 2
Current constraints:
django>=2.2 (from django-debug-toolbar==3.1.1->-r /tmp/pipenv_gy3sdfkrequirements/pipenv-4p6znxo8-constraints.txt (line 2))
django-debug-toolbar (from -r /tmp/pipenv_gy3sdfkrequirements/pipenv-4p6znxo8-constraints.txt (line 2))
sqlparse>=0.2.0 (from django-debug-toolbar==3.1.1->-r /tmp/pipenv_gy3sdfkrequirements/pipenv-4p6znxo8-constraints.txt (line 2))
Finding the best candidates:
found candidate django==3.1.3 (constraint was >=2.2)
found candidate django-debug-toolbar==3.1.1 (constraint was <any>)
found candidate sqlparse==0.4.1 (constraint was >=0.2.0)
Finding secondary dependencies:
django-debug-toolbar==3.1.1 requires django>=2.2, sqlparse>=0.2.0
django==3.1.3 requires asgiref<4,>=3.2.10, pytz, sqlparse>=0.2.2
sqlparse==0.4.1 requires -
New dependencies found in this round:
adding ['asgiref', '<4,>=3.2.10', '[]']
adding ['pytz', '', '[]']
adding ['sqlparse', '>=0.2.0,>=0.2.2', '[]']
Removed dependencies in this round:
removing ['sqlparse', '>=0.2.0', '[]']
------------------------------------------------------------
Result of round 2: not stable
ROUND 3
Current constraints:
asgiref<4,>=3.2.10 (from django==3.1.3->django-debug-toolbar==3.1.1->-r /tmp/pipenv_gy3sdfkrequirements/pipenv-4p6znxo8-constraints.txt (line 2))
django>=2.2 (from django-debug-toolbar==3.1.1->-r /tmp/pipenv_gy3sdfkrequirements/pipenv-4p6znxo8-constraints.txt (line 2))
django-debug-toolbar (from -r /tmp/pipenv_gy3sdfkrequirements/pipenv-4p6znxo8-constraints.txt (line 2))
pytz (from django==3.1.3->django-debug-toolbar==3.1.1->-r /tmp/pipenv_gy3sdfkrequirements/pipenv-4p6znxo8-constraints.txt (line 2))
sqlparse>=0.2.0,>=0.2.2 (from django-debug-toolbar==3.1.1->-r /tmp/pipenv_gy3sdfkrequirements/pipenv-4p6znxo8-constraints.txt (line 2))
Finding the best candidates:
found candidate asgiref==3.3.1 (constraint was >=3.2.10,<4)
found candidate django==3.1.3 (constraint was >=2.2)
found candidate django-debug-toolbar==3.1.1 (constraint was <any>)
found candidate pytz==2020.4 (constraint was <any>)
found candidate sqlparse==0.4.1 (constraint was >=0.2.0,>=0.2.2)
Finding secondary dependencies:
asgiref==3.3.1 requires -
django==3.1.3 requires asgiref<4,>=3.2.10, pytz, sqlparse>=0.2.2
django-debug-toolbar==3.1.1 requires django>=2.2, sqlparse>=0.2.0
sqlparse==0.4.1 requires -
pytz==2020.4 requires -
------------------------------------------------------------
Result of round 3: stable, done
Generating hashes:
asgiref
django
django-debug-toolbar
sqlparse
pytz
Tried constraint: <InstallRequirement object: django<3.0,>=2.2.9 editable=False>
Traceback (most recent call last):
File "/home/kususer/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 763, in <module>
main()
File "/home/kususer/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 759, in main
parsed.requirements_dir, parsed.packages, parse_only=parsed.parse_only)
File "/home/kususer/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 741, in _main
resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages)
File "/home/kususer/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 714, in resolve_packages
results = clean_results(results, resolver, project)
File "/home/kususer/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 596, in clean_results
entry_dict = translate_markers(entry.get_cleaned_dict(keep_outdated=False))
File "/home/kususer/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 239, in get_cleaned_dict
self.validate_constraints()
File "/home/kususer/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 536, in validate_constraints
raise DependencyConflict(msg)
pipenv.exceptions.DependencyConflict: ERROR: Cannot resolve conflicting version django<3.0,>=2.2.9 while django==3.1.3 is locked.
Steps to replicate
pipenv install 'Django>=2.2.9,<3.0'
pipenv install --dev django-debug-toolbar
$ pipenv --support
Pipenv version: '2020.11.4'
Pipenv location: '/home/kususer/.local/lib/python3.6/site-packages/pipenv'
Python location: '/usr/bin/python3'
Python installations found:
3.6.8:/usr/bin/python33.6.8:/usr/bin/python3.63.6.8:/usr/bin/python3.6m3.6.8:/bin/python33.6.8:/bin/python3.63.6.8:/bin/python3.6m2.7.5:/usr/bin/python22.7.5:/usr/bin/python2.72.7.5:/bin/python22.7.5:/bin/python2.7
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.6.8',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '3.10.0-1160.2.2.el7.x86_64',
'platform_system': 'Linux',
'platform_version': '#1 SMP Sat Oct 17 05:06:47 UTC 2020',
'python_full_version': '3.6.8',
'python_version': '3.6',
'sys_platform': 'linux'}
System environment variables:
COLORTERMDBUS_SESSION_BUS_ADDRESSDESKTOP_SESSIONDISPLAYGDMSESSIONGDM_LANGGJS_DEBUG_OUTPUTGJS_DEBUG_TOPICSGNOME_DESKTOP_SESSION_IDGNOME_SHELL_SESSION_MODEGNOME_TERMINAL_SCREENGNOME_TERMINAL_SERVICEHOMEIMSETTINGS_INTEGRATE_DESKTOPIMSETTINGS_MODULELANGLESSLOGNAMELS_COLORSPATHPWDQT_IM_MODULERPM_PACKAGERSESSION_MANAGERSHELLSHLVLSSH_AGENT_PIDSSH_AUTH_SOCKTERMUSERUSERNAMEVTE_VERSIONWINDOWPATHXAUTHORITYXDG_CURRENT_DESKTOPXDG_DATA_DIRSXDG_MENU_PREFIXXDG_RUNTIME_DIRXDG_SEATXDG_SESSION_DESKTOPXDG_SESSION_IDXDG_SESSION_TYPEXDG_VTNRXMODIFIERSfish_user_pathsPIP_DISABLE_PIP_VERSION_CHECKPYTHONDONTWRITEBYTECODEPIP_SHIMS_BASE_MODULEPIP_PYTHON_PATHPYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH:/home/kususer/bin/:/home/kususer/.local/bin/:/home/kususer/.poetry/bin/:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbinSHELL:/usr/bin/fishLANG:en_US.UTF-8PWD:/home/kususer/Documents/pl
Contents of Pipfile ('/home/kususer/Documents/pl/Pipfile'):
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
django = ">=2.2.9,<3.0"
[dev-packages]
django-debug-toolbar = "*"
[requires]
python_version = "3.6"
Contents of Pipfile.lock ('/home/kususer/Documents/pl/Pipfile.lock'):
{
"_meta": {
"hash": {
"sha256": "380611a92b6137f3ca308e9814f3889804511816acbb9b9411e8b3f3d7d73620"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.6"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {
"django": {
"hashes": [
"sha256:558cb27930defd9a6042133258caf797b2d1dee233959f537e3dc475cb49bd7c",
"sha256:cf5370a4d7765a9dd6d42a7b96b53c74f9446cd38209211304b210fe0404b861"
],
"index": "pypi",
"version": "==2.2.17"
},
"pytz": {
"hashes": [
"sha256:3e6b7dd2d1e0a59084bcee14a17af60c5c562cdc16d828e8eba2e683d3a7e268",
"sha256:5c55e189b682d420be27c6995ba6edce0c0a77dd67bfbe2ae6607134d5851ffd"
],
"version": "==2020.4"
},
"sqlparse": {
"hashes": [
"sha256:017cde379adbd6a1f15a61873f43e8274179378e95ef3fede90b5aa64d304ed0",
"sha256:0f91fd2e829c44362cbcfab3e9ae12e22badaa8a29ad5ff599f9ec109f0454e8"
],
"markers": "python_version >= '3.5'",
"version": "==0.4.1"
}
},
"develop": {}
}
Reacted by javulticat and Kirill Malyshev
Metadata
Metadata
Assignees
Labels
Category: Dependency ResolutionIssue relates to dependency resolution.Issue relates to dependency resolution.Type: RegressionThis issue is a regression of a previous behavior.This issue is a regression of a previous behavior.
Activity
frostming commentedon Nov 10, 2020
Planning to cut a release after the regression issues are fixed and if no more to be added.
py-pipenv: update to 2022.1.8