Roundup Tracker - Issues

Message7664

Author schlatterbeck
Recipients schlatterbeck
Date 2022-11-22.15:35:24
Message-id <1669131324.17.0.600526530039.issue2551241@roundup.psfhosted.org>
In-reply-to
I'm getting several failed tests with python3.7 and the then-current version of psycopg2. This fails most of the indexer tests in test/test_liveserver.py, e.g. 

test/test_liveserver.py:1305: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
roundup/instance.py:116: in open
    'db': backend.Database(self.config, name)
roundup/backends/rdbms_common.py:232: in __init__
    self.indexer = get_indexer(config, self)
roundup/backends/indexer_common.py:158: in get_indexer
    from roundup.backends.indexer_postgresql_fts import Indexer
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    """
    
    import re
    
    from roundup.backends.indexer_common import Indexer as IndexerBase
    from roundup.i18n import _
    from roundup.cgi.exceptions import IndexerQueryError
    
>   from psycopg2.errors import InFailedSqlTransaction, SyntaxError, \
                                UndefinedObject
E                               ModuleNotFoundError: No module named 'psycopg2.errors'

roundup/backends/indexer_postgresql_fts.py:13: ModuleNotFoundError

Testing this on the command-line it looks like older psycopg2 modules do not have 'errors':

On Debian stable bullseye (version 11):
% python3
Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from psycopg2 import errors
>>> 

On Debian oldstable buster (version 10):
% python3
Python 3.7.3 (default, Jan 22 2021, 20:04:44) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from psycopg2 import errors
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'errors' from 'psycopg2' (/usr/lib/python3/dist-packages/psycopg2/__init__.py)
History
Date User Action Args
2022-11-22 15:35:24schlatterbecksetrecipients: + schlatterbeck
2022-11-22 15:35:24schlatterbecksetmessageid: <1669131324.17.0.600526530039.issue2551241@roundup.psfhosted.org>
2022-11-22 15:35:24schlatterbecklinkissue2551241 messages
2022-11-22 15:35:24schlatterbeckcreate