Package: psycopg2
Version: 2.8.3-2
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu focal ubuntu-patch

Dear maintainers,

The psycopg2 quite sensibly runs autopkgtests to confirm the module's
compatibility with all supported versions of python:

[...]
for PG in $(/usr/share/postgresql-common/supported-versions); do
  for PY in $(pyversions --supported) $(py3versions --supported); do
[...]

However, it does not declare test dependencies on python-all and
python3-all, so not all the versions of python returned by py{3,}versions
--supported are guaranteed to be installed, resulting in failures such as
the following:

[...]
### PostgreSQL 11, python3.8 ###
+ echo ### PostgreSQL 11, python3.8 ###
+ LANG=C.UTF-8 LC_ALL=C.UTF-8 PSYCOPG2_TESTDB_HOST=localhost PSYCOPG2_TESTDB=pos
tgres PSYCOPG2_TEST_FAST=1 pg_virtualenv -v 11 python3.8 -c import tests; tests.
unittest.main(defaultTest='tests.test_suite') --verbose
[...]
11  regress 5435 online ubuntu /tmp/pg_virtualenv.ebTtT7/data/11/regress 
/tmp/pg_virtualenv.ebTtT7/log/postgresql-11-regress.log

/usr/bin/pg_virtualenv: line 235: python3.8: command not found
[...]

  (http://autopkgtest.ubuntu.com/packages/p/psycopg2/focal/amd64)

This is an issue today in Ubuntu where python3-defaults has been updated to
support python3.8.  It has not yet hit Debian, since this version of
python3-defaults is still only in experimental.

The attached patch adds the necessary test deps on python{3,}-all.

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru psycopg2-2.8.3/debian/tests/control 
psycopg2-2.8.3/debian/tests/control
--- psycopg2-2.8.3/debian/tests/control 2019-09-05 05:02:53.000000000 -0700
+++ psycopg2-2.8.3/debian/tests/control 2019-10-24 15:42:20.000000000 -0700
@@ -1,3 +1,3 @@
-Depends: @, postgresql-all
+Depends: @, postgresql-all, python-all, python3-all
 Tests: unittest
 Restrictions: allow-stderr

Reply via email to