]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Coerce to float for Float with all native decimal backends
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 26 Jun 2017 20:50:24 +0000 (16:50 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 26 Jun 2017 20:50:24 +0000 (16:50 -0400)
commit563180f7d46b24bd334d227104c90bf8cdb81158
treee4423138b130b9fc248e2bae3a3cd0cca5771a59
parent33d083c0347ccfb80fa546b0a580035ac7c48983
Coerce to float for Float with all native decimal backends

The result processor for the :class:`.Float` type now unconditionally
runs values through the ``float()`` processor if the dialect
specifies that it also supports "native decimal" mode.  While most
backends will deliver Python ``float`` objects for a floating point
datatype, the MySQL backends in some cases lack the typing information
in order to provide this and return ``Decimal`` unless the float
conversion is done.

Change-Id: I638f1480fb00a507036efaf0e0080f26893d98ad
Fixes: #4020
doc/build/changelog/changelog_12.rst
doc/build/changelog/migration_12.rst
lib/sqlalchemy/sql/sqltypes.py
lib/sqlalchemy/testing/suite/test_types.py