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

Let users choose between psycopg2 and psycopg2-binary #60

Merged
merged 1 commit into from
Aug 2, 2019

Conversation

asherf
Copy link
Member

@asherf asherf commented Jul 11, 2019

Switch to psycopg2-binary

if you run the plain python 3.7 image from docker hub, installing this package fails. docker run -it python:3.7.3-slim-stretch /bin/sh

Screenshot 2019-07-11 15 13 17

@asherf asherf changed the title psycopg2 is busted on newer version of python (3.7), so switch to psycopg2-binary if you run the plain python 3.7 image from docker hub, installing this package fails. docker run -it python:3.7.3-slim-stretch /bin/sh psycopg2 is busted on newer version of python (3.7) Jul 11, 2019
@asherf asherf requested review from shimizukawa and Surgo July 11, 2019 22:16
@asherf
Copy link
Member Author

asherf commented Jul 20, 2019

ping @Surgo @shimizukawa

@aaugustin aaugustin changed the title psycopg2 is busted on newer version of python (3.7) Let users choose between psycopg2 and psycopg2-binary Jul 30, 2019
@aaugustin
Copy link

I'm facing the same issue. The description is misleading; I'm fixing it.

django-redshift-backend depends on psycopg2, which has become a source-only package again. Pre-built wheels are available in the psycopg2-binary package.

After reading why the psycopg2 / psycopg2-binary split exists, I don't think that django-redshift-backend can make a good choice for all users.

Would it be best to remove the dependency and tell users to install the version that works for them? psycopg2-binary if they don't have the prerequisites for compilation, psycopg2 if they're hitting the segfaults caused by psycopg2-binary.

@ryankuczka
Copy link

I am also facing this issue. I do not have the prerequisites to install psycopg2 and would prefer to use psycopg2-binary which is currently restricting me from using this library as-is.

Currently I've found a couple workarounds, but neither of them are ideal. The first is to install this package with --no-deps, however, this requires installing this package separately from the rest of my project's requirements. The second is to use psycopg2<2.8 which can install a pre-built wheel at the expense of not being the latest version and an annoying warning instructing the user to use pscyopg2-binary.

@Surgo Surgo merged commit 0ec6e22 into jazzband:master Aug 2, 2019
@Surgo
Copy link
Member

Surgo commented Aug 2, 2019

Thank you @asherf

@Surgo
Copy link
Member

Surgo commented Aug 2, 2019

Sorry late action :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants