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

psycopg2 warning #3106

Closed
brainwane opened this issue Mar 1, 2018 · 12 comments
Closed

psycopg2 warning #3106

brainwane opened this issue Mar 1, 2018 · 12 comments
Labels
bug 🐛 developer experience Anything that improves the experience for Warehouse devs help needed We'd love volunteers to advise on or help fix/implement this.

Comments

@brainwane
Copy link
Contributor

When I make initdb or make tests, one error I see in the logs is:

/opt/warehouse/lib/python3.6/site-packages/psycopg2/init.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: http://initd.org/psycopg/docs/install.html#binary-install-from-pypi.

@brainwane brainwane added requires triaging maintainers need to do initial inspection of issue and removed requires triaging maintainers need to do initial inspection of issue labels Mar 1, 2018
@ewdurbin
Copy link
Member

ewdurbin commented Mar 1, 2018

this is rather prescriptive, @dstufft thoughts on if we should just upgrade to psycopg2-binary now? https://pypi.org/project/psycopg2-binary/

@di
Copy link
Member

di commented Mar 1, 2018

Kind of interesting why they're doing this, more details:

Looks like the -binary release still offers a source distribution, so switching to it should be equivalent.

Along these lines, we could probably use a "how to add new dependencies to warehouse" guide somewhere...

@jleclanche
Copy link

I do not recommend switching to psycopg2-binary. It breaks any dependency which depends on psycopg2, such as sqlalchemy's postgres bindings, even though they both provide the import.

Context: psycopg/psycopg2#674

@di
Copy link
Member

di commented Mar 5, 2018

@jleclanche I'm not really sure what you mean by "breaks", if they provide the same import and (presumably) the same functionality, what's broken?

@dstufft
Copy link
Member

dstufft commented Mar 5, 2018

The dependency metadata, the system will see "I require a project named psycopg2 of at least version X" installed, and that won't be (because psycopg2-binary will be installed instead). It'll be compatible at the import level, but not at the packaging metadata level.

@di
Copy link
Member

di commented Mar 5, 2018

That's what I figured. At least for us, this wouldn't break anything (we're not even installing sqlalchemy with the postgres extra, which is what adds the pyscopg2 dependency).

@Cykooz
Copy link

Cykooz commented Mar 7, 2018

But the psycopg2-binary has not resolved problem with libssl.

Imagine, what if near future all python libraries will be depends from psycopg2-binary instead of psycopg2. What will this situation be different from when there was only one version of psycopg2?

@brainwane brainwane added this to the 6. Post Legacy Shutdown milestone Mar 12, 2018
@brainwane brainwane added Post launch - medium priority developer experience Anything that improves the experience for Warehouse devs and removed requires triaging maintainers need to do initial inspection of issue labels Mar 12, 2018
@drunkwcodes
Copy link

drunkwcodes commented Mar 25, 2018

If uploader can determine the default dowloading format on the server-side when people downloading with pip install, It will solve this issue IMHO.

Pip (or clients) can't determine which version is recommended by itself sometimes.

Here is a plan for precedence logic of downloading format:

pip_options_specified or uploader_recommended or wheel_preferred

ref: pypa/wheel#215

@brainwane brainwane added help needed We'd love volunteers to advise on or help fix/implement this. bug 🐛 labels May 2, 2018
@di
Copy link
Member

di commented Apr 4, 2019

As of version 2.8, the psycopg2 package no longer publishes built distributions for manylinux.

We'll probably want to switch to psycopg2-binary to avoid building from source.

@dstufft
Copy link
Member

dstufft commented May 10, 2019

Is building from source a big deal for us? We already build a number of other things from source IIRC?

@drunkwcodes
Copy link

To bootstrap in an uncertain circumstance?

@dstufft
Copy link
Member

dstufft commented May 12, 2019

This is solved now due to #5696.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 developer experience Anything that improves the experience for Warehouse devs help needed We'd love volunteers to advise on or help fix/implement this.
Projects
None yet
Development

No branches or pull requests

7 participants