-
Notifications
You must be signed in to change notification settings - Fork 557
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
UserWarning: The psycopg2 wheel package will be renamed from release 2.8 #844
Comments
Downgrading to psycopg2 v2.7.3.2 avoids the warning ( |
Do you guys know if this warning can be suppressed? Thanks! |
@pshlykov If you are running pglci from a virtual environment you can install psycopg2 v2.7.3.2 to get around the warning. By default, pgcli will install the latest version of psycopg2. |
I'll change the dependency to Thanks for reporting. |
Released in 1.9.0. |
@amjith Changing the dependency to Since binary wheels were introduced in psycopg2 just one year ago, I think it's more reasonable to continue to depend on psycopg2, which will be a source-only package starting from 2.8. This will emit a warning until psycopg2 2.8 is released, which is discussed in this ticket and on the psycopg2 homepage linked above. |
pip install psycopg2 (2.7.4) help |
@GIS90 Uninstall the old psycopg2 package; your system should switch to using the -binary package automatically. |
pip install psycopg2-binary |
this problem might be coz of you did not migrate your database |
I know that adding to this post probably won't help, but I actually want to stick with psycopg2 (not use the binary) but get rid of that really annoying warning. I actually ran into an unusual edge-case where the psycopg2-binary wheel didn't work properly for me in one particular project only (got some strange byte alignment error, I guess this is why the wheel version didn't work that well). Does this really mean I have to put up with the warning until version 2.8 is released. edit: I was actually forced to install 2.6.2 (the last version before the switch to wheels) in this project because the wheel version had the alignment error come up, so really the 2.8 release is quite important for me and hope it's soon as it fixes this mess. |
The warning is silenced in pgcli (starting 1.10.0): #894. |
May I ask why this was downvoted? In the interest of education. |
The error message notification starting with version 2.8 of psycopg2 requires the following installation. pip install psycopg2-binary If you're using version 2.x being, can ignore this warning tip. |
How do you silence this warning if you want to use psycopg2 source? |
Not sure. I attempted to silence them before: Line 8 in a763236
that trick worked for a little bit and then stopped. You're welcome to try and poke around some more with warnings. If you find the right way to do that, we'll welcome a PR! |
It still works @j-bennet it just has to be one of the first things that loads when your app starts up. I had to move some code to ensure the warnings.filterwarning(...) loaded first when starting the app and use this in several applications. Edit: I don't know why pgcli imports from pgspecial.namedqueries before the filterwarnings statement, this also doesn't really follow python imports grouping convention where only standard lib imports should be first |
Would it be possible to allow either to be used? My project depends on the binary version and having to have both installed for pgcli is a bit of a nuisance. Would be appreciated. |
Because of I did rebuild from source of psycopg 2.8.3, then my project raised the message too. |
This solution worked for me. |
uninstall psycopg2 : install psycopg2-binary: system switch using the psycopg2-binary package automatically |
Description
The psycopg2 package display's a user warning when calling pgcli. They have a blog post describing why this warning is displayed: http://initd.org/psycopg/articles/2018/02/08/psycopg-274-released/.
Warning Message
Your environment
System Information
Please provide your OS and version information.
Ubuntu 16.04.3 LTS (xenial, x86_64)
Please provide your CLI version.
pgcli Version: 1.8.2
What is the output of
pip freeze
command.The text was updated successfully, but these errors were encountered: