diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-11-15 12:11:12 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-11-15 12:56:37 -0500 |
commit | e0e6fe44e38230363bc471d1c0a467900c81077a (patch) | |
tree | ec9b16e8b353d661916ab987947aacb0373f7419 /lib/sqlalchemy/util/langhelpers.py | |
parent | 996727ed89cd2403e75e3ab924f01754d408075d (diff) | |
download | sqlalchemy-e0e6fe44e38230363bc471d1c0a467900c81077a.tar.gz |
Modernize cx_Oracle parameters
Updated the parameters that can be sent to the cx_Oracle DBAPI to both allow
for all current parameters as well as for future parameters not added yet.
In addition, removed unused parameters that were deprecated in version 1.2,
and additionally we are now defaulting "threaded" to False.
Fixes: #4369
Change-Id: I599668960e7b2d5bd1f5e6850e10b5b3ec215ed3
Diffstat (limited to 'lib/sqlalchemy/util/langhelpers.py')
-rw-r--r-- | lib/sqlalchemy/util/langhelpers.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py index c2ebf7637..8815ed837 100644 --- a/lib/sqlalchemy/util/langhelpers.py +++ b/lib/sqlalchemy/util/langhelpers.py @@ -1024,7 +1024,9 @@ def coerce_kw_type(kw, key, type_, flexi_bool=True): when coercing to boolean. """ - if key in kw and not isinstance(kw[key], type_) and kw[key] is not None: + if key in kw and ( + not isinstance(type_, type) or not isinstance(kw[key], type_) + ) and kw[key] is not None: if type_ is bool and flexi_bool: kw[key] = asbool(kw[key]) else: |