]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Separate Numeric and Float
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 13 Apr 2020 14:25:27 +0000 (10:25 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 9 Dec 2024 19:29:26 +0000 (14:29 -0500)
commit311e142ea6eef34106830bce520c6be8edd1e5da
tree68d3e3d153bfd033f99718cb3bf15f9f21bc8ea7
parent8ef266711d68f710ea6344fad1ce6911a50e7b7f
Separate Numeric and Float

the :class:`.Numeric` and :class:`.Float` SQL types have been separated out
so that :class:`.Float` no longer inherits from :class:`.Numeric`; instead,
they both extend from a common mixin :class:`.NumericCommon`.  This
corrects for some architectural shortcomings where numeric and float types
are typically separate, and establishes more consistency with
:class:`.Integer` also being a distinct type.   The change should not have
any end-user implications except for code that may be using
``isinstance()`` to test for the :class:`.Numeric` datatype; third party
dialects which rely upon specific implementation types for numeric and/or
float may also require adjustment to maintain compatibility.

Fixes: #5252
Change-Id: Iadc841340b3d97e3eb5f7e63f0a0cc3cb4e30f74
19 files changed:
doc/build/changelog/unreleased_21/5252.rst [new file with mode: 0644]
doc/build/core/type_basics.rst
lib/sqlalchemy/__init__.py
lib/sqlalchemy/dialects/mssql/base.py
lib/sqlalchemy/dialects/mysql/base.py
lib/sqlalchemy/dialects/mysql/types.py
lib/sqlalchemy/dialects/oracle/cx_oracle.py
lib/sqlalchemy/dialects/postgresql/_psycopg_common.py
lib/sqlalchemy/dialects/postgresql/asyncpg.py
lib/sqlalchemy/dialects/postgresql/pg8000.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/sqltypes.py
lib/sqlalchemy/testing/suite/test_reflection.py
lib/sqlalchemy/types.py
test/dialect/mysql/test_reflection.py
test/ext/test_horizontal_shard.py
test/requirements.py
test/sql/test_metadata.py
test/sql/test_operators.py