-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Bump psycopg2 to 2.7.4; #5698
Bump psycopg2 to 2.7.4; #5698
Changes from 6 commits
1774c77
3b84714
3df781a
e84dd5d
30c2ea0
d44b477
8742614
60ca4d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -186,7 +186,13 @@ fi | |
if [ $FETCH_WHEELS -eq 1 ]; then | ||
pip install $requirement_args --index-url "${GALAXY_WHEELS_INDEX_URL}" --extra-index-url "${PYPI_INDEX_URL}" | ||
GALAXY_CONDITIONAL_DEPENDENCIES=$(PYTHONPATH=lib python -c "from __future__ import print_function; import galaxy.dependencies; print('\n'.join(galaxy.dependencies.optional('$GALAXY_CONFIG_FILE')))") | ||
[ -z "$GALAXY_CONDITIONAL_DEPENDENCIES" ] || echo "$GALAXY_CONDITIONAL_DEPENDENCIES" | pip install -r /dev/stdin --index-url "${GALAXY_WHEELS_INDEX_URL}" --extra-index-url "${PYPI_INDEX_URL}" | ||
if [ -n "$GALAXY_CONDITIONAL_DEPENDENCIES" ]; then | ||
if pip list --format=columns | grep "psycopg2[\(\ ]*2.7.3"; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, good idea. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This actually somehow make pip blow out on my shell!
(edit: only with the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nsoranzo Very strange... Can you 'pip list' at all, manually from the .venv? Edit: Or are you saying that the addition of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see the same thing here. https://unix.stackexchange.com/questions/305547/broken-pipe-when-grepping-output-but-only-with-i-flag seems to explain it. I can either leave out -q, or do something like: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dannon See edited message above, adding the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pypa/pip#4170 is the upstream bug, if you're interested. |
||
echo "An older version of psycopg2 (non-binary, version 2.7.3) has been detected. Galaxy now uses psycopg2-binary, which will be installed after removing psycopg2." | ||
pip uninstall -y psycopg2==2.7.3 | ||
fi | ||
echo "$GALAXY_CONDITIONAL_DEPENDENCIES" | pip install -r /dev/stdin --index-url "${GALAXY_WHEELS_INDEX_URL}" --extra-index-url "${PYPI_INDEX_URL}" | ||
fi | ||
fi | ||
|
||
# Check client build state. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we change the name of this - it won't
upgrade(edit: uninstall might be a better word) older versions of this when upgrading Galaxy right? This could still be the right thing to do but maybe we need to think about how to handle that - should we uninstall psycopg2 in common startup?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmchilton Good point, I can check what happens but I don't know how this would behave off the top of my head if you have both installed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To update this comment, which was subsequently discussed on IRC - the suspicion was correct. Installing psycopg2-binary does not automatically uninstall psycopg2 even though they share the same namespace in site-packages. This leaves you in a weird situation where pip thinks both are installed, but really only the most recently installed library is intact.
Uninstalling the previous lib will mangle the new one, and so taking care to manually remove
psycopg2==2.4.3
and removing it prior to installing a newpsycopg2-binary
version, when in galaxy's .venv, is what I've implemented in subsequent commits. This seems the safest path.This behavior should mirror what pip would do if we had a new version of
psycopg2==2.4.3
listed here -- that is, uninstalling the old prior to installing new.