heroku / django-heroku

[DEPRECATED] Do not use! See https://github.com/heroku/django-heroku/issues/56
BSD 3-Clause "New" or "Revised" License
459 stars 142 forks source link

Fix Psycopg2 warning #7

Closed jylin closed 6 years ago

jylin commented 6 years ago

Using this module, I get a warning on startup:

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>.
  """)

This warning can be easily fixed by changing the dependency to psycopg2-binary instead of psycopg2.

Another issue is using pipenv graph, I see the following dependencies which looks different from what I see in the Pipenv file for this project:

django-heroku==0.2.0
  - dj-database-url [required: Any, installed: 0.4.2]
  - django [required: Any, installed: 2.0.2]
    - pytz [required: Any, installed: 2018.3]
  - psycopg2 [required: Any, installed: 2.7.4]
  - whitenoise [required: Any, installed: 3.3.1]

In the Pipenv file, I don't see psycopg2 but I do see gunicorn which is not present above.

ddahan commented 6 years ago

I seriously start to doubt about Heroku willingness to maintain Django compatibility with Heroku platform, when such an easy fix is still pending, 4 months after...

mgrdcm commented 6 years ago

@ddahan Just created #19 to try to get an answer :)

sigmavirus24 commented 6 years ago

As suggested in #18, this package should not be using psycopg2-binary and the warning is overzealous in this case. It's unclear what other action is desired here for people to consider this "maintained". psycopg2-binary should only be used when users need to get up and running quickly. django-heroku is meant for production systems, and thus we should keep using psycopg2. If things have changed, or I'm misunderstanding something here, please do let me know.

mgrdcm commented 6 years ago

I agree with @sigmavirus24 on this completely. What matters for django-heroku package is that this can be deployed on Heroku, and as long as Heroku can build psycopg2 from source (which I believe it can) then this package should stick with the normal source distribution as recommended by psycopg2 itself.

mgrdcm commented 6 years ago

I assume psycopg2-binary provides psycopg2 so if you need to use it for local development can always do that manually.