-
-
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
Upgrading a dependency with --selective-upgrade doesn't seem to work with 2018.6.25 #2412
Comments
|
Sorry for the hoops! I am bad at reading when I’m in a hurry :( this looks like a caching issue. If you |
Also, let me know if that does work |
@techalchemy I tried removing the cache as you suggested but am still experiencing the issue. |
With pipenv, version 2018.6.25: pipenv install /usr/lib/python2.7/site-packages/pipenv/_compat.py:108: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/pipenv-reyGF6-requirements'> This does not occur with pipenv v11.10.4 |
@mark-adams yeah I can replicate this for sure. @DaveKlassen that is a completely separate issue and I believe I have that fixed in #2417 but if not youre going to have to open another issue. |
Ah, ok. It's good to know that I'm not crazy. Thanks for taking a look. This has had us super confused for several days about how upgrading a single dependency is supposed to work. 😝 |
@mark-adams I was confused too because I thought I fixed this but apparently I fixed |
Ah, gotcha. I've just confirmed that |
yeah I'm going to fix it properly so it only actually updates one (currently it just re-locks if you use the |
I'm having the same issue with v2018.7.1. Actually I don't get so far what is the recommended command to update a single package. Both ways do not work currently; they seem to update everything. |
If you have a problem with a thing that is different from the one described please open a new issue. It’s really hard to troubleshoot issues without details. All commands are supposed to work. |
Hi @techalchemy, is there a fix for this available yet? Any way I can help? |
Soooo... Any progress on this? I updated Pipenv to 2018.11.26 (latest at the time of writing) and the workflow still doesn't work... |
Am I right in thinking that, due to this bug, there is currently no available command to upgrade a single package? It seems the only way at the moment to upgrade a package without changing the locked versions of the other packages in Pipfile.lock is by doing this: pipenv uninstall PACKAGENAME && pipenv install --selective-upgrade "PACKAGENAME" |
@geoffroy-noel-ddh Interestingly, in my case it still upgrades all packages. Pipenv |
Thanks @p-himik , you're right, uninstall locks everything. This should work:
|
I am also seeing all packages being updated when using:
Pipenv Version: 2018.11.26 |
One thing I'm unclear of regarding this bug report: Is I'm trying to debug the related issue mentioned above where installing a new package with It's hard to understand what's the intended behavior is -- there's the As they are currently documented, it makes sense that if I run |
Has anyone found any way to upgrade a single package? |
I dug some in the The docs are just simply wrong right now on that you are supposed to be able to run |
I'm using |
This is the last major blocker for using Pipfile for us, and for many others I guess. Hence the high number of comments and level of energy here. I know that the volunteer (thank you) maintainers are very busy, but just posting either about upstream requirements that are blocking this (maybe this needs a new feature in pip?), or giving a sketch of a solution (to allow people who are not experts to potentially help) would to a lot to alleviate things during the time while this issue stays open. At least if there was a sketch of a solution, I would look to see if there is a piece I could pick up. |
This is motivated by the issues around pipenv always upgrading every dependency whenever you touch any dependency. (See pypa/pipenv#2665 and pypa/pipenv#2412)
This is motivated by the issues around pipenv always upgrading every dependency whenever you touch any dependency. (See pypa/pipenv#2665 and pypa/pipenv#2412)
Urllib3 had a security vulnerability, which was flagged by GitHub's security alerts. As this was a dependency of twine, a dev dependency, this did not really affect the library. Unfortunately, because of pypa/pipenv#2412 there is no functional "--selective-upgrade" option for pipenv and I could not just change the lockfile for that one thing, and so the other dependencies have been updated as well. It will be a little bit out-of-sync with what has been released (in that the latest was built against pyyaml 5.1.1 and not 5.1), but this is okay.
I've found this issue because today I was confused on why it seems I cannot update a single package and update the What exactly is the right workflow to update EDIT: fixed typos :-) |
You can use this workaround:
|
That issue is really a problem :( @revolter To your workaround: How to generate a Pipfile with exact versions?!? I don't see an easy way to do that. The output of "pip freeze" doesn't help here because I want to keep the sections "default" and "develop". |
@jedie, What I meant was simply to use any text editor to specify it. As an example, instead of:
you should change it to:
for the step |
@revolter pinning a version will not prevent other packages to be updated to the Pipfile.lock unless you pin them all, which is exactly what pipenv is supposed to fix in the first place :P This really really really need to be fixed. |
Here's the procedure I used to bump a single package for a hotfix scenario:
This could probably get messy when a lot of inter-dependencies are involved, but in my specific case it was straightforward. |
I've followed the @jonapich instructions, but it did not worked out, because at my company CI we use the flag |
Maybe this can help: #3461 (comment)
|
You don't tell :| So that's why you downvoted my comment? I obviously know that this is an issue, and that it should be fixed. I was just providing a workaround until this gets fixed.
This is flawed if the package to update has dependencies that also need to be updated. |
Adding another scenario here: in my project, I'm using two libraries that have recently started having conflicting dependencies. I'm perfectly fine to keep the versions that do not conflict, but I still want to apply hot patches for other stuff. Because any |
This still does not work in pipenv |
Still an issue in pipenv After losing a bunch of time to pipenv today, here's my workaround:
|
For those who are adding new library but do not want to change the existing dependencies that are already in
|
This still does not work in pipenv |
I don't expect this to ever work as expected, given how tangled up this code is. I moved on to poetry ages ago, primarily because of this. |
I used to use and like Pipenv but no longer think it’s viable - the project is in maintenance mode and has some serious unfixed issues ([link](pypa/pipenv#2665), [link](pypa/pipenv#2412)) which have been “fixed” by removing fundamental features since the dev team was [unable to figure out](pypa/pipenv#4988) what was going on in the codebase. Other dev teams are also [abandoning](log2timeline/dftimewolf#636) this package manager. Poetry offers some significant advantages such as compatibility with the pyproject.toml standard, the ability to upgrade a single dependency, and the ability to publish packages.
Running using the latest release (2018.6.25), selective upgrades don't appear to work as expected. (If I'm doing something wrong, please let me know :-) )
This was originally filed as #2410 but was closed out because it was thought to have been fixed in the latest release.
/home/madams/.local/venvs/pipenv/bin/python -m 'pipenv.help'
$ python -m pipenv.help output
Pipenv version:
'2018.6.25'
Pipenv location:
'/home/madams/.local/venvs/pipenv/local/lib/python2.7/site-packages/pipenv'
Python location:
'/home/madams/.local/venvs/pipenv/bin/python'
Other Python installations in
PATH
:2.7
:/usr/bin/python2.7
2.7
:/usr/bin/python2.7
3.6
:/usr/bin/python3.6m
3.6
:/usr/bin/python3.6
2.7.15
:/usr/bin/python
2.7.15
:/usr/bin/python2
3.6.5
:/usr/bin/python3
PEP 508 Information:
System environment variables:
GOPATH
PYPI_PASSWORD
IM_CONFIG_PHASE
LESS
QT4_IM_MODULE
GJS_DEBUG_OUTPUT
PROJECT_HOME
LC_CTYPE
WINDOWPATH
XDG_CURRENT_DESKTOP
XDG_SESSION_TYPE
TERM_PROGRAM_VERSION
QT_IM_MODULE
LOGNAME
USER
PATH
XDG_VTNR
HOME
VSCODE_IPC_HOOK
VIRTUALENVWRAPPER_SCRIPT
ZSH
DISPLAY
XDG_SESSION_DESKTOP
LANG
TERM
VIRTUALENVWRAPPER_WORKON_CD
XAUTHORITY
SESSION_MANAGER
XDG_DATA_DIRS
DEBFULLNAME
MANDATORY_PATH
QT_ACCESSIBILITY
GNOME_DESKTOP_SESSION_ID
CLUTTER_IM_MODULE
TEXTDOMAIN
GNOME_TERMINAL_SERVICE
EDITOR
XMODIFIERS
GPG_AGENT_INFO
VSCODE_NLS_CONFIG
USERNAME
WORKON_HOME
GTK_IM_MODULE
VSCODE_CLI
XDG_RUNTIME_DIR
VIRTUALENVWRAPPER_PROJECT_FILENAME
ELECTRON_NO_ATTACH_CONSOLE
SSH_AUTH_SOCK
VTE_VERSION
GDMSESSION
KRB5CCNAME
TEXTDOMAINDIR
GNOME_SHELL_SESSION_MODE
SHELL
PIP_PYTHON_PATH
PYTHONDONTWRITEBYTECODE
TERM_PROGRAM
XDG_SESSION_ID
DBUS_SESSION_BUS_ADDRESS
_
DEFAULTS_PATH
ATOM_REPOS_HOME
DESKTOP_SESSION
LSCOLORS
XDG_CONFIG_DIRS
VIRTUALENVWRAPPER_HOOK_DIR
VSCODE_NODE_CACHED_DATA_DIR_5546
XDG_SEAT
VSCODE_NODE_CACHED_DATA_DIR_29546
OLDPWD
DEBEMAIL
GTK_MODULES
SHLVL
PWD
PYPI_USERNAME
COLORTERM
CHROME_DESKTOP
GSM_SKIP_SSH_AGENT_WORKAROUND
XDG_MENU_PREFIX
LS_COLORS
PAGER
GJS_DEBUG_TOPICS
GNOME_TERMINAL_SCREEN
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:./node_modules/.bin:/home/madams/.cargo/bin:/usr/local/go/bin:./node_modules/.bin:/home/madams/.cargo/bin:/usr/local/go/bin:./node_modules/.bin:/home/madams/.cargo/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/madams/dev/go/bin:/usr/lib/scala/bin:/home/madams/.rvm/bin:/opt/node/bin:/home/madams/.local/bin:/home/madams/dev/go/bin:/usr/lib/scala/bin:/home/madams/.rvm/bin:/opt/node/bin:/home/madams/.local/bin:/home/madams/dev/go/bin:/usr/lib/scala/bin:/home/madams/.rvm/bin:/opt/node/bin:/home/madams/.local/bin
SHELL
:/usr/bin/zsh
EDITOR
:vim
LANG
:en_US.UTF-8
PWD
:/home/madams/dev/pipenv-selective-upgrade-test
Contents of
Pipfile
('/home/madams/dev/pipenv-selective-upgrade-test/Pipfile'):Contents of
Pipfile.lock
('/home/madams/dev/pipenv-selective-upgrade-test/Pipfile.lock'):Expected result
If I run
pipenv install --selective-upgrade requests
, I expect the lockfile to be updated torequests==2.19.1
and the new version to be installed in the virtualenv.Actual result
The lockfile is not updated and the new version of requests is not installed.
Steps to replicate
pipenv install
pipenv install --selective-upgrade requests
The text was updated successfully, but these errors were encountered: