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

do not use psycopg2-binary ? #29

Open
vincentsarago opened this issue Feb 3, 2021 · 3 comments
Open

do not use psycopg2-binary ? #29

vincentsarago opened this issue Feb 3, 2021 · 3 comments

Comments

@vincentsarago
Copy link
Member

vincentsarago commented Feb 3, 2021

The doc advise to no use the binary as application dependency 🤷‍♂️

The psycopg2-binary package is meant for beginners to start playing with Python and PostgreSQL without the need to meet the build requirements.

If you are the maintainer of a published package depending on psycopg2 you shouldn’t use psycopg2-binary as a module dependency. For production use you are advised to use the source distribution.

ref: https://www.psycopg.org/docs/install.html#quick-install (edit)

https://github.com/arturo-ai/arturo-stac-api/blob/7d4c9572981e935de2521441878f3ffb78f6b9b7/setup.py#L15

@kylebarron
Copy link
Contributor

Can you link to that doc? Do they give any reasons why you shouldn't use the wheel?

@vincentsarago
Copy link
Member Author

@kylebarron updated the issue with the link

I think the main reason is

The binary packages come with their own versions of a few C libraries, among which libpq and libssl, which will be used regardless of other libraries available on the client: upgrading the system libraries will not upgrade the libraries used by psycopg2. Please build psycopg2 from source if you want to maintain binary upgradeability.

@kylebarron
Copy link
Contributor

Since we use Docker it likely isn't an issue. you just need libpq I think.

@gadomski gadomski transferred this issue from stac-utils/stac-fastapi May 11, 2023
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

No branches or pull requests

2 participants