]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Ensure float are not implemented as numeric
authorFederico Caselli <cfederico87@gmail.com>
Wed, 26 Apr 2023 19:40:38 +0000 (21:40 +0200)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 9 May 2023 14:14:58 +0000 (10:14 -0400)
commitff821e57c960f095ab2988a0f892b3127374f498
tree4dc3c70ff635ccaa77702976326e5c83b279d19c
parent39c8e95b1f50190ff30a836b2bcf13ba2cacc052
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
doc/build/changelog/unreleased_20/suite_float_tests.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/oracle/types.py
lib/sqlalchemy/dialects/postgresql/asyncpg.py
lib/sqlalchemy/dialects/postgresql/pg8000.py
lib/sqlalchemy/testing/requirements.py
lib/sqlalchemy/testing/suite/test_types.py
test/requirements.py