-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Do not use the upstream Pipenv #290
Comments
@torsava How about not upgrading dependencies to latest versions when installing pipenv? |
As the pipenv situation didn't improve after the latest release I fixed this issue for now by overriding the assemble file. If someone wants to follow along simply copy the respective assemble file of the python version you use into your project and change the function install_pipenv() {
if [ ! -z ${PIN_PIPENV_VERSION} ]; then
pipenv_req="pipenv==${PIN_PIPENV_VERSION}"
else
pipenv_req="pipenv"
fi
if [ ! -z ${PIN_PIP_VERSION} ]; then
pip_req="pip==${PIN_PIP_VERSION}"
else
pip_req="pip"
fi
echo "---> Installing $pipenv_req packaging tool with $pip_req ..."
VENV_DIR=$HOME/.local/venvs/pipenv
virtualenv_bin "$VENV_DIR"
$VENV_DIR/bin/pip --isolated install -U $pipenv_req $pip_req
mkdir -p $HOME/.local/bin
ln -s $VENV_DIR/bin/pipenv $HOME/.local/bin/pipenv
} Now provide a specific pipenv + pip version via Note: I used the prefix PIN_ to prevent issues with naming clashes. Namely PIP_VERSION. If you have a better idea, let me know. :) |
Apologies, I'm currently swamped with a different project. How urgent is this? |
FWIW, you can't use RPM version of |
IFAIK this is no longer a problem but I agree that it might be handy for future cases to be able to pin a specific pip/pipenv version. Could you please open a PR or should somebody else take over it? |
@frenzymadness My proposal isn't tested (it was good enough for my situation though) and it has to be adapted to all assemble files I guess. However, feel free to take over. Although I worry that it will take a while to get merged, as @torsava already mentioned beeing occupied elsewhere. |
A PR for pinning the version would be great. If anyone can create it, we'll get it merged. |
I would like to implement it but I need help. I completely understand the problem and how we can solve it but, there are two copies of pip installed in the image:
Implementation of PIP_PIPENV_VERSION is quite simple. But what PIN_PIP_VERSION should mean? Should it has an impact on the version of pip installed in venv with pipenv only or should both pip copies should be updated to that version? How to communicate this with users? |
@frenzymadness (from my memories) Usually it is only required to pin the system's pip version. That is because when pipenv is installed it is (or was) conflicting with the existing pip due to some upstream changes. What pipenv is then installing inside the virtualenv shouldn't matter anymore. However, I cannot recall why I pinned pip inside pipenv as well. Maybe it was due to some strange behavior.
I think this depends on the variable
Good question. To keep it simple I suggest to only be able to pin the system's pip or pipenv. At the end I assume most users would pin pip only, because
In case of (1) if users don't use pipenv, then pinning the system's pip makes sense. If they do use pipenv though, they probably should pin pip inside of the Pipfile instead. So the system's pip is unimportant and only used to install pipenv itself. However, this is done automatically anyway. I hope that helps! :) |
Thanks @hakkeroid for your comment. I think that we can keep this issue open until a new bug of incompatibility between pip and pipenv shows up to see what the exact problem is and how to solve it. Pipenv was under heavy development in 2018 (more than 70 releases in one year) but now it seems to be less in rush with better care about other depending projects. In the meantime, if it'd be beneficial for anybody to have a possibility to pin a specific version of pip, feel free to comment here or send a pull request. |
FYI, we proposed an alternative "micropipenv" - we use it in aicoe to tackle also this issue in #368 |
The latest images have the possibility to use micropipenv and in this PR #387 I'll implement We still cannot and don't want to include pipenv to the image itself but the latest improvements should give you enough control and reproducible builds. |
|
The recent issues on upstream Pipenv caused s2i builds to always fail:
The upstream issue can be found at pypa/pipenv#2924 A brief summary - Pipenv relies on some logic present in pip and with a new pip release where the shared logic changed, Pipenv broke. Even though the patch to address the issue was already merged into Pipenv master today, we are still unable to build any s2i based project that is using Pipenv as a bugfix release was not not issued by upstream since Friday when this issue occurred.
As Pipenv is already packaged as an RPM it could be worth to consider adding Pipenv to the base image from Fedora repositories so s2i does not rely on the latest Pipenv that can introduce such issues.
The text was updated successfully, but these errors were encountered: