]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
remove "native decimal" warning
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 8 Nov 2021 17:20:23 +0000 (12:20 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 17 Nov 2021 23:21:48 +0000 (18:21 -0500)
commit93fad8fb0c5421ad162064e0aa506cb1e70cbf2b
tree6566691a17686e206864856f30d46f6b0982be53
parent958f902b1fc528fed0be550bc573545de47ed854
remove "native decimal" warning

Removed the warning that emits from the :class:`_types.Numeric` type about
DBAPIs not supporting Decimal values natively. This warning was oriented
towards SQLite, which does not have any real way without additional
extensions or workarounds of handling precision numeric values more than 15
significant digits as it only uses floating point math to represent
numbers. As this is a known and documented limitation in SQLite itself, and
not a quirk of the pysqlite driver, there's no need for SQLAlchemy to warn
for this. The change does not otherwise modify how precision numerics are
handled. Values can continue to be handled as ``Decimal()`` or ``float()``
as configured with the :class:`_types.Numeric`, :class:`_types.Float` , and
related datatypes, just without the ability to maintain precision beyond 15
significant digits when using SQLite, unless alternate representations such
as strings are used.

Fixes: #7299
Change-Id: Ic570f8107177dec3ddbe94c7b43f40057b03276a
doc/build/changelog/unreleased_20/7299.rst [new file with mode: 0644]
lib/sqlalchemy/sql/sqltypes.py
lib/sqlalchemy/testing/requirements.py
lib/sqlalchemy/testing/suite/test_types.py
test/perf/orm2010.py
test/requirements.py
test/sql/test_types.py