summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/util/langhelpers.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-01-03 20:43:45 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2015-01-03 20:43:45 -0500
commit93742b3d5c16d3f1e27ff0d10c8e65e1b54971a3 (patch)
tree2c772e76dcd10ccb7512bd30917c6fab110e7fb9 /lib/sqlalchemy/util/langhelpers.py
parent01a22a673ecefcc212b124d11c74d99b6f02cfb0 (diff)
downloadsqlalchemy-93742b3d5c16d3f1e27ff0d10c8e65e1b54971a3.tar.gz
- The :class:`.mysql.SET` type has been overhauled to no longer
assume that the empty string, or a set with a single empty string value, is in fact a set with a single empty string; instead, this is by default treated as the empty set. In order to handle persistence of a :class:`.mysql.SET` that actually wants to include the blank value ``''`` as a legitimate value, a new bitwise operational mode is added which is enabled by the :paramref:`.mysql.SET.retrieve_as_bitwise` flag, which will persist and retrieve values unambiguously using their bitflag positioning. Storage and retrieval of unicode values for driver configurations that aren't converting unicode natively is also repaired. fixes #3283
Diffstat (limited to 'lib/sqlalchemy/util/langhelpers.py')
-rw-r--r--lib/sqlalchemy/util/langhelpers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py
index ac6b50de2..7f57e501a 100644
--- a/lib/sqlalchemy/util/langhelpers.py
+++ b/lib/sqlalchemy/util/langhelpers.py
@@ -969,7 +969,7 @@ def coerce_kw_type(kw, key, type_, flexi_bool=True):
kw[key] = type_(kw[key])
-def constructor_copy(obj, cls, **kw):
+def constructor_copy(obj, cls, *args, **kw):
"""Instantiate cls using the __dict__ of obj as constructor arguments.
Uses inspect to match the named arguments of ``cls``.
@@ -978,7 +978,7 @@ def constructor_copy(obj, cls, **kw):
names = get_cls_kwargs(cls)
kw.update((k, obj.__dict__[k]) for k in names if k in obj.__dict__)
- return cls(**kw)
+ return cls(*args, **kw)
def counter():