-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
problem for libraries that depend on psycopg2 going forward #837
Comments
Using I should be able to release 2.8 in a few days which shouldn't have the problem anymore. |
How do I specify |
@cjw296 it's written in the manual. I don't know conda, nobody ever asked me to support it. |
@dvarrazzo Sorry to comment on this ticket again (I'm sure you're tired of this mess), but I don't understand exactly what libraries should do, dependency-wise. I just received an issue in a library package of mine (a custom field for Django that uses the Postgres I'm a little confused as to what I, as a library author, should do here. I could remove the dependency completely, but that would be strictly wrong, I think, since psycopg2 is really a dependency of my package. Simply changing the dependency to Perhaps the proper solution could be added to the FAQ section of the docs as well, as this seems to affect multiple users, judging by #674. |
I think your library should depend on |
I realize the decision to split off the While splitting off the psycopg2-binary package provides a direct user with the same install options as before, I am not sure it works now for dependent libraries such as my pgcopy. My setup.py specifies I imagine the following have been discussed before:
I don’t know if either of the above are feasible or likely, but I would argue that until one or the other are supported, recommending Thanks again for your efforts |
@altaurog I don't understand what you are even asking from this project. pip behaviour is not within the realm of the things we can change. If you can make so that the binary packages declares "provides psycopg" We are not changing to distribute psycopg2 wheels by default again, until someone provides a way to reproduce #543, and a fix for it. This is not even remotely open for discussion. Your argument is "it works for me, so sod off everyone else". I have a different opinion: in my view psycopg's reliability comes before the property of being installable without a compiler and a dev package. There is plenty you could fix. Fix pip. Provide a script to reproduce #543 (because someone is working on packaging libssl 1.1, which may work or not, without reproducing #543 there is not a chance those packages will be default. Don't ask me to reduce psycopg reliability for your convenience. |
@dvarrazzo - I understand that this is an inflammatory issue but I feel @altaurog's comments were pretty reasonable. People who write libraries that depend on psycopg2 are currently put in a tough spot: it's not our place to mandate either I think the inclusion of the warning in the last binary- From what you've said, it sounds like your preferred choice for library developers would be to depend on How about just killing |
@cjw296 libraries developers have no problem: they can specify Another option us to depend on none and ask your user to install psycopg themselves. Another user is to depend on <2.8. Killing binary is an option yes. It won't fix people opening bugs to report a failed installation though. I've lost my hopes about that. You can still lobby setuptools team asking to improve setup metadata. |
According to the maintainers of the `psycopg2` and `psycopg2-binary` packages, production software and libraries [should depend on](https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary) `psycopg2`: > 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.** See [this thread](psycopg/psycopg2#837 (comment)) for additional context.
Just to get this out the way, I think issuing a
UserWarning
when there's nothing a user can do to make that warning stop, other than writing code to ignore the warning which will then become a wart to be forgotten about and stumbled over alter is a mistake, I've read #701 and while @matsaman's tone wasn't ideal, I can appreciate where they're coming from.So, as a library author, I have libraries such as https://github.com/Mortar/mortar_mixins that depend on psycopg2. It's unclear to me what I put in my dependencies going forward; it seems that regardless of whether I put
pyscopg2
orpsycopg2-binary
, I'm forcing a choice on my end users that isn't my place to make.As a concrete example: if I put
psycopg2
, I currently get thatUserWarning
, which most people will rightly understand as "I'm doing something wrong". If I putpsycopg2-binary
, then I break people using conda, because I'm forcing them to no-longer user the conda-provided packages that are optimised for the conda environment.I see there's plenty of discussion of this over on #674, but I wanted to to ask this concrete question, because as a library author, it seems like there's nothing "correct" I can do here :-/
The text was updated successfully, but these errors were encountered: