Skip to content
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

Merged
merged 8 commits into from
Mar 29, 2018
2 changes: 1 addition & 1 deletion lib/galaxy/dependencies/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def check(self, name):
except Exception:
return False

def check_psycopg2(self):
def check_psycopg2_binary(self):
return self.config["database_connection"].startswith("postgres")

def check_mysql_python(self):
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/dependencies/conditional-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# These dependencies are only required when certain config options are set
psycopg2==2.7.3
psycopg2-binary==2.7.4
Copy link
Member

@jmchilton jmchilton Mar 15, 2018

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?

Copy link
Member Author

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.

Copy link
Member Author

@dannon dannon Mar 28, 2018

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 new psycopg2-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.

WebError==0.10.3
Pygments==2.2.0
python-openid
Expand Down