diff options
author | Miłosz Stypiński <mstypins@cisco.com> | 2021-06-24 12:21:30 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-06-28 11:34:00 -0400 |
commit | 5933a5dc2ec29248e1b8842245c8ddabd819c6dd (patch) | |
tree | a48a171f3c0a491655064719c3cb1fc3d38382fb /lib/sqlalchemy/dialects/postgresql/pypostgresql.py | |
parent | b02087666e4ff9199ea221fbee37be8438ecd7f0 (diff) | |
download | sqlalchemy-5933a5dc2ec29248e1b8842245c8ddabd819c6dd.tar.gz |
Be less fiscal regarding validators functions
Adjusted the check in the mapper for a callable object that is used as a
``@validates`` validator function or a ``@reconstructor`` reconstruction
function, to check for "callable" more liberally such as to accommodate
objects based on fundamental attributes like ``__func__`` and
``__call___``, rather than testing for ``MethodType`` / ``FunctionType``,
allowing things like cython functions to work properly. Pull request
courtesy Miłosz Stypiński.
Fixes: #6538
Closes: #6539
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/6539
Pull-request-sha: ed1d7fe5c9386bab0416ff32095afc777c26b6ca
Change-Id: I8350558bc9a9ba58f43e48e12ce25a0b30e4d767
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/pypostgresql.py')
0 files changed, 0 insertions, 0 deletions