-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Pipenv installs spurious dependencies #4371
Comments
Not sure why it ends up at the top-level, but django does require asgiref in setup.cfg: |
Yes, Django started requiring asgiref in Django 3. If you look at the requirements for Django 2.2.x, asgiref is absent: https://github.com/django/django/blob/stable/2.2.x/setup.py#L86 |
The linked #4455 provides more context: The packages that are being installed are future dependencies; that is, dependencies of later versions of packages that This is still a problem in pipenv 2022.1.8. |
@GPHemsley-RELX Can you check if it is still a problem in my branch that upgrades to latest pip? Branch is EDIT: Nevermind, I just checked the steps it appears to still be a problem even on my branch:
Just noting this is specifically an issue of installing a new dependency as |
@matteius My current solution is creating default constraints associated with
Should I open a PR just for this case? |
* Add test, ensure dev lock use default packages as constraints. * Use default packages as constraints when locking develop packages. * Add test, ensure installing dev-packages use default packages as constraints. (#4371) (#2987) * Use default packages as constraints when installing provided dev packages. * change vistir.path.normalize_path to pipenv.utils.shell.normalize_path * Add function that get contraints from packages. * Add test for get_constraints_from_deps function * Use get_constraints_from_deps to get constraints * Use @cached_property instead of @Property * Use standalone utility to write constraints file * prepare_constraint_file use precomputed constraints. * Add news fragment.
New version of |
* Add test, ensure dev lock use default packages as constraints. * Use default packages as constraints when locking develop packages. * Add test, ensure installing dev-packages use default packages as constraints. (pypa#4371) (pypa#2987) * Use default packages as constraints when installing provided dev packages. * change vistir.path.normalize_path to pipenv.utils.shell.normalize_path * Add function that get contraints from packages. * Add test for get_constraints_from_deps function * Use get_constraints_from_deps to get constraints * Use @cached_property instead of @Property * Use standalone utility to write constraints file * prepare_constraint_file use precomputed constraints. * Add news fragment.
Issue description
When installing any version of Django < 3.0 as a dependency and django-debug-toolbar as a dev dependency,
pipenv lock
determines that asgiref is a required package when it in fact is not.Expected result
Actual result
Steps to replicate
In a new project, run the following commands:
$ pipenv --support
Pipenv version:
'2020.6.2'
Pipenv location:
'/usr/local/Cellar/pipenv/2020.6.2/libexec/lib/python3.8/site-packages/pipenv'
Python location:
'/usr/local/Cellar/pipenv/2020.6.2/libexec/bin/python3.8'
Python installations found:
3.8.0
:/Users/jmorris/.pyenv/versions/3.8.0/bin/python3
3.7.7
:/usr/local/bin/python3
3.7.7
:/usr/local/bin/python3.7m
3.7.7
:/usr/local/bin/python3.7
3.6.8
:/Users/jmorris/.pyenv/versions/3.6.8/bin/python3
3.5.9
:/Users/jmorris/.pyenv/versions/3.5.9/bin/python3
3.5.1
:/Users/jmorris/.pyenv/versions/3.5.1/bin/python3
2.7.18
:/Users/jmorris/.pyenv/versions/2.7.18/bin/python2
2.7.17
:/usr/local/bin/python2
2.7.17
:/usr/local/bin/python2.7
2.7.16
:/usr/bin/python2.7
PEP 508 Information:
System environment variables:
PATH
TERM_PROGRAM
TERM
SHELL
TMPDIR
Apple_PubSub_Socket_Render
TERM_PROGRAM_VERSION
TERM_SESSION_ID
USER
SSH_AUTH_SOCK
__CF_USER_TEXT_ENCODING
PWD
EDITOR
LANG
ITERM_PROFILE
XPC_FLAGS
XPC_SERVICE_NAME
SHLVL
PYENV_SHELL
HOME
COLORFGBG
LC_TERMINAL_VERSION
ITERM_SESSION_ID
LOGNAME
LESS
LESSOPEN
LC_TERMINAL
COLORTERM
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
:/usr/local/Cellar/pipenv/2020.6.2/libexec/tools:/Users/jmorris/.pyenv/shims:/Users/jmorris/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/MacGPG2/bin:/Applications/Wireshark.app/Contents/MacOS
SHELL
:/usr/local/bin/fish
EDITOR
:vim
LANG
:en_US.UTF-8
PWD
:/tmp/lol
Contents of
Pipfile
('/private/tmp/lol/Pipfile'):Contents of
Pipfile.lock
('/private/tmp/lol/Pipfile.lock'):The text was updated successfully, but these errors were encountered: