switched requirement for sqlalchemy-postgres-copy #681
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… from psycopg2 to psycopg2-binary version.
sqlalchemy-postgres-copy currently requires psycopg2. However, triage
requires psycopg2-binary, (and pip doesn't know that these provide the
same package). As such, a build of triage attempts to install BOTH
psycopg2 AND psycopg2-binary. Assuming this builds, it doesn't
necessarily provide the wrong version: -binary might overshadow
non-binary. However, not all test environments have the necessary
libraries to build psycopg2 from source; (hence, the need for a binary
version).
This change resolves the issue by requiring an UNMERGED version of
sqlalchemy-postgres-copy which requires psycopg2-binary.
However, this isn't ideal. Alternatives for future work include:
replacing sqlalchemy-posgres-copy with our code -- (we scarcely get
any use out of the library, so we could just bring in what little we need)
our own fork of sqlalchemy-postgres-copy
producing a shim distro (or github repo) which installs an empty/no-op
psycopg2 -- to satisfy the requirement of sqlalchemy-postgres-copy (and
any others) -- while the actual module (import) is nonetheless satisfied
by our requirement of psycopg2-binary
simply requiring psycopg2 (non-binary) in triage by changing the
requirement to:
psycopg2==2.8.2
. This is the recommended version, andwhich should no longer trigger warnings, as it will not allow installation
of the binary version at all. However, it will thus require that all users
of triage have postgresql libraries installed, or the build (and tox) will
fail with an error, e.g.:
You need to install postgresql-server-dev-X.Y for building a server-side
extension or libpq-dev for building a client-side application
Other options (which I don't think are workable):
psycopg2==2.7.7 --only-binary psycopg2
, (or--no-binary
).HOWEVER, this syntax is only supported by pip, not by setup.py installs,
(and thus it is not appropriate for triage).