]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Export array module from postgresql
authorFederico Caselli <cfederico87@gmail.com>
Mon, 29 Jan 2024 19:09:56 +0000 (20:09 +0100)
committerFederico Caselli <cfederico87@gmail.com>
Mon, 29 Jan 2024 19:37:49 +0000 (20:37 +0100)
Before this module was shadowed by same named array classe.

Change-Id: I6fc56795c9363a9a07466fd36fcd49d0fb9658f7

lib/sqlalchemy/dialects/postgresql/__init__.py
lib/sqlalchemy/dialects/postgresql/base.py

index f85c1e990da26c603b3137e6bb4d53099566a4bb..8dfa54d3aca4274d9ba6a73e37040fc0a6c1462a 100644 (file)
@@ -8,6 +8,7 @@
 
 from types import ModuleType
 
+from . import array as arraylib  # noqa # must be above base and other dialects
 from . import asyncpg  # noqa
 from . import base
 from . import pg8000  # noqa
@@ -86,6 +87,7 @@ from .types import TIMESTAMP
 from .types import TSQUERY
 from .types import TSVECTOR
 
+
 # Alias psycopg also as psycopg_async
 psycopg_async = type(
     "psycopg_async", (ModuleType,), {"dialect": psycopg.dialect_async}
index ef70000c1bc00302e931b8f0e85a6e3e98eb40ac..f5297ec25de58e93fc4fa6d2595740c41f215d1b 100644 (file)
@@ -1419,13 +1419,13 @@ from typing import TYPE_CHECKING
 from typing import TypedDict
 from typing import Union
 
-from . import array as _array
-from . import hstore as _hstore
+from . import arraylib as _array
 from . import json as _json
 from . import pg_catalog
 from . import ranges as _ranges
 from .ext import _regconfig_fn
 from .ext import aggregate_order_by
+from .hstore import HSTORE
 from .named_types import CreateDomainType as CreateDomainType  # noqa: F401
 from .named_types import CreateEnumType as CreateEnumType  # noqa: F401
 from .named_types import DOMAIN as DOMAIN  # noqa: F401
@@ -1614,7 +1614,7 @@ colspecs = {
 
 ischema_names = {
     "_array": _array.ARRAY,
-    "hstore": _hstore.HSTORE,
+    "hstore": HSTORE,
     "json": _json.JSON,
     "jsonb": _json.JSONB,
     "int4range": _ranges.INT4RANGE,