]> git.openstreetmap.org Git - nominatim.git/blobdiff - src/nominatim_api/sql/async_core_library.py
osm2pgsq: do not use deprecated tablespace options
[nominatim.git] / src / nominatim_api / sql / async_core_library.py
index c26846fbeb5a22b7b931f2f3e9fc1746774c6753..f8e29749984d2bc4844fc736d595cc75ebe03a35 100644 (file)
@@ -7,15 +7,17 @@
 """
 Import the base library to use with asynchronous SQLAlchemy.
 """
-# pylint: disable=invalid-name
+# pylint: disable=invalid-name, ungrouped-imports, unused-import
 
 from typing import Any
 
 try:
+    import sqlalchemy.dialects.postgresql.psycopg
     import psycopg
     PGCORE_LIB = 'psycopg'
     PGCORE_ERROR: Any = psycopg.Error
 except ModuleNotFoundError:
+    import sqlalchemy.dialects.postgresql.asyncpg
     import asyncpg
     PGCORE_LIB = 'asyncpg'
     PGCORE_ERROR = asyncpg.PostgresError