Project

Profile

Help

Task #3375

Update psycopg2 dependency to psycopg2-binary

Added by bizhang almost 3 years ago. Updated about 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix
Sprint:
Quarter:

Description

The psycopg2[0] package is going to move their wheels files to psycopg2-binary when version 2.8 is released.

We should switch our dependency to psycopg2-binary[1]. The wheel installation is self contained, and does not need external runtime dependencies [2] installed.

[0] https://pypi.python.org/pypi/psycopg2/2.7.4
[1] https://github.com/pulp/pulp/blob/3.0-dev/pulpcore/setup.py#L13
[2] http://initd.org/psycopg/docs/install.html#runtime-requirements


Related issues

Related to Packaging - Task #3533: Prepare for pypi pulp3 beta releaseMODIFIED

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by bizhang almost 3 years ago

  • Related to Task #3533: Prepare for pypi pulp3 beta release added

#2 Updated by dalley almost 3 years ago

The PyPI landing page for psychopg2-binary says the following, FWIW:

The binary package is a practical choice for development and testing but in production it is advised to use the package built from sources.

#3 Updated by bizhang almost 3 years ago

The reason psycopg2-binary was separated from psycopg2 is because of occasional errors that resulted from different versions of libssl being imported by psycopg2-binary and by urllib/requests. [0]
Pulp does not use urlib nor requests to open https connections (AFAICT asyncio does not use libssl)

I think we should separate out this dependency for rpm packages and pypi packages. We have no way of ensuring the existence of build tools and runtime libraries on the client with python only dependencies.
We should work with the build team to ensure that the necessary build dependencies [1] for psycopg2 exist for the RPM package and depend on a source build for our rpm package, but continue using the binary for pypi installs

[0] http://initd.org/psycopg/articles/2018/02/08/psycopg-274-released
[1] http://initd.org/psycopg/docs/install.html#build-prerequisites

#4 Updated by bizhang almost 3 years ago

  • Status changed from NEW to POST
  • Assignee set to bizhang

#5 Updated by bizhang almost 3 years ago

I've mentioned this to pcreech, he pointed out that psycopg2 already has a rpm built: https://buildlogs.centos.org/centos/7/sclo/x86_64/rh/rh-python36/
and we can just depend on that for our rpm :)

#6 Updated by werwty almost 3 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#7 Updated by daviddavis almost 2 years ago

  • Sprint/Milestone set to 3.0.0

#8 Updated by bmbouter over 1 year ago

  • Tags deleted (Pulp 3)

#9 Updated by bmbouter about 1 year ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF