]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
resolve large ints to BigInteger
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 10 Jun 2022 16:57:53 +0000 (12:57 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 10 Jun 2022 17:23:20 +0000 (13:23 -0400)
commitbc0367c670cc1376b90ab2309085bd660ec317c9
treebfb1a99c07e084c402442b46922c79a39662e2ef
parentb171f5d2e488c46a664847644e65d5dc03759840
resolve large ints to BigInteger

The in-place type detection for Python integers, as occurs with an
expression such as ``literal(25)``, will now apply value-based adaption as
well to accommodate Python large integers, where the datatype determined
will be :class:`.BigInteger` rather than :class:`.Integer`. This
accommodates for dialects such as that of asyncpg which both sends implicit
typing information to the driver as well as is sensitive to numeric scale.

Fixes: #7909
Change-Id: I1cd3ec2676c9bb03ffedb600695252bd0037ba02
doc/build/changelog/unreleased_20/7909.rst [new file with mode: 0644]
lib/sqlalchemy/sql/sqltypes.py
lib/sqlalchemy/testing/suite/test_types.py