On Sat, 17 Feb 2018 07:56:31 +0000 Marten KARL <marten.k...@milkbar.tips> wrote: > Package: python3-postgresql > Version: 1.1.0-2+b4 > Severity: grave > Justification: renders package unusable > > Split of Versionstring fails: > db = postgresql.open(database='marten',host='10.8.2.1',port=5431) > # postgresql-v10 runs on port 5431 on that machine > -> > File "/usr/lib/python3/dist-packages/postgresql/versionstring.py", line 28, in <listcomp> > vlist = [int(x or '0') for x in v[:-1]] > ValueError: invalid literal for int() with base 10: '2 (Debian 10' > > My solution: > Changed line from > v = vstr.strip().split('.') > to > v = vstr.strip().split(' ')[0].split('.') > > Tests with that changed file run well with different databases on postgresql v9.4, v9.6 and 10.2 > on my systems.
There is a new upstream release: https://pypi.python.org/pypi/py-postgresql I checked and this is unchanged. From the bit of text provided, it looks like the version number is customized in the Debian postgresql packages and python3-postgresql doesn't handle it well. The patch seems reasonable to me. Scott K