From: Ben Trofatter Date: Mon, 18 Mar 2013 19:40:40 +0000 (-0700) Subject: Corrected silly circular import introduced by original "fix". X-Git-Tag: rel_0_8_1~26^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b00c6555f67d0837ae64a33077dd87571fc1e0e;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Corrected silly circular import introduced by original "fix". --- diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 0d40c87f40..c59caff8d2 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -195,7 +195,6 @@ from ... import sql, schema, exc, util from ...engine import default, reflection from ...sql import compiler, expression, util as sql_util, operators from ... import types as sqltypes -from .hstore import HSTORE try: from uuid import UUID as _python_UUID @@ -894,7 +893,6 @@ ischema_names = { 'interval': INTERVAL, 'interval year to month': INTERVAL, 'interval day to second': INTERVAL, - 'hstore': HSTORE, } diff --git a/lib/sqlalchemy/dialects/postgresql/hstore.py b/lib/sqlalchemy/dialects/postgresql/hstore.py index 157e03fd51..e555a1afd9 100644 --- a/lib/sqlalchemy/dialects/postgresql/hstore.py +++ b/lib/sqlalchemy/dialects/postgresql/hstore.py @@ -6,7 +6,7 @@ import re -from .base import ARRAY +from .base import ARRAY, ischema_names from ... import types as sqltypes from ...sql import functions as sqlfunc from ...sql.operators import custom_op @@ -276,6 +276,9 @@ class HSTORE(sqltypes.Concatenable, sqltypes.TypeEngine): return process +ischema_names['hstore'] = HSTORE + + class hstore(sqlfunc.GenericFunction): """Construct an hstore value within a SQL expression using the Postgresql ``hstore()`` function.