FS#62463 - [python-psycopg2] Can not import psycopg2 after upgraing to version 2.8.2-1

Attached to Project: Community Packages
Opened by José Jorge (mexchip) - Wednesday, 24 April 2019, 15:07 GMT
Last edited by Doug Newgard (Scimmia) - Wednesday, 24 April 2019, 18:09 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

After upgrading python-psycopg2 package from 2.7.7-1 to 2.8.2-1, it's not possible to use import it from python scripts. When trying to import psycopg2 this error appears:
ImportError: /usr/lib/python3.7/site-packages/psycopg2/_psycopg.cpython-37m-x86_64-linux-gnu.so: undefined symbol: PQencryptPasswordConn

Downgrading to 2.7.7-1 fixes the problem.

Pacman upgrade log:
[2019-04-22 08:57] [ALPM] upgraded python-psycopg2 (2.7.7-1 -> 2.8.2-1)

Package versions:
* python 3.7.3-1
* python-psycogp2 2.8.2-1
* postgresql 9.6.5-1

Steps to reproduce:
* Upgrade python-psycopg2 (current version is 2.8.2-1)
* Start python REPL
* Try to import psycopg2:

$ python
Python 3.7.3 (default, Mar 26 2019, 21:43:19)
[GCC 8.2.1 20181127] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import psycopg2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.7/site-packages/psycopg2/__init__.py", line 50, in <module>
from psycopg2._psycopg import ( # noqa
ImportError: /usr/lib/python3.7/site-packages/psycopg2/_psycopg.cpython-37m-x86_64-linux-gnu.so: undefined symbol: PQencryptPasswordConn
>>>


This task depends upon

Closed by  Doug Newgard (Scimmia)
Wednesday, 24 April 2019, 18:09 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Partial updates are not supported
Comment by Chih-Hsuan Yen (yan12125) - Wednesday, 24 April 2019, 15:13 GMT
The symbol PQencryptPasswordConn is provided by /usr/lib/libpq.so.5, and the latter comes from postgresql-libs 11.2-3.

> postgresql 9.6.5-1

Apparently your system is not up-to-date.
Comment by José Jorge (mexchip) - Wednesday, 24 April 2019, 15:46 GMT
I was keeping postgresql 9.6 because of some tools incompatibilities with newer versions. Time to check that pending upgrade or ignore another package :P.

Thank you!
Comment by José Jorge (mexchip) - Wednesday, 24 April 2019, 17:50 GMT
Just to confirm, upgrading postgresql-libs allows importing psycopg2 2.8.2. This issue can be closed.

Loading...