summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/asyncpg.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2023-04-26 21:40:38 +0200
committerMike Bayer <mike_mp@zzzcomputing.com>2023-05-09 10:14:58 -0400
commitff821e57c960f095ab2988a0f892b3127374f498 (patch)
tree4dc3c70ff635ccaa77702976326e5c83b279d19c /lib/sqlalchemy/dialects/postgresql/asyncpg.py
parent39c8e95b1f50190ff30a836b2bcf13ba2cacc052 (diff)
downloadsqlalchemy-ff821e57c960f095ab2988a0f892b3127374f498.tar.gz
Ensure float are not implemented as numeric
Fixed the base class for dialect-specific float/double types; Oracle :class:`_oracle.BINARY_DOUBLE` now subclasses :class:`_sqltypes.Double`, and internal types for :class:`_sqltypes.Float` for asyncpg and pg8000 now correctly subclass :class:`_sqltypes.Float`. Added suite tests to ensure that floating point types, such as class:`_types.Float` and :class:`_types.Double` are not resolved as class:`_types.Numeric` in the dialect, since it may not compatible in all cases, such as when casting a value. Change-Id: I20b814e8e029d57921d9728a55f2570f74c35c87
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/asyncpg.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/asyncpg.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/asyncpg.py b/lib/sqlalchemy/dialects/postgresql/asyncpg.py
index c879205e4..a25502b90 100644
--- a/lib/sqlalchemy/dialects/postgresql/asyncpg.py
+++ b/lib/sqlalchemy/dialects/postgresql/asyncpg.py
@@ -322,7 +322,7 @@ class AsyncpgNumeric(sqltypes.Numeric):
)
-class AsyncpgFloat(AsyncpgNumeric):
+class AsyncpgFloat(AsyncpgNumeric, sqltypes.Float):
__visit_name__ = "float"
render_bind_cast = True