]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Make boolean processors consistent between Py/C; coerce to 1/0
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 23 Jun 2016 23:26:28 +0000 (19:26 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 23 Jun 2016 23:58:43 +0000 (19:58 -0400)
commit7c74d702a9632a8c7264d6972e46985de3fb2487
tree9db49b27827f580b856671186aae2d40952d74f2
parentbf03d4332ae35e2087b175f8a2e0291d2f4c9aa0
Make boolean processors consistent between Py/C; coerce to 1/0

The processing performed by the :class:`.Boolean` datatype for backends
that only feature integer types has been made consistent between the
pure Python and C-extension versions, in that the C-extension version
will accept any integer value from the database as a boolean, not just
zero and one; additionally, non-boolean integer values being sent to
the database are coerced to exactly zero or one, instead of being
passed as the original integer value.

Change-Id: I01e647547fd7047bd549dd70e1fa202c51e8328b
Fixes: #3730
doc/build/changelog/changelog_11.rst
doc/build/changelog/migration_11.rst
lib/sqlalchemy/cextension/processors.c
lib/sqlalchemy/processors.py
test/engine/test_processors.py
test/sql/test_types.py