Bug#394999: [Python-modules-team] Bug#394999: python-mysqldb: Str2Set conversion broken

Jonas Meurer jonas at freesources.org
Wed Nov 1 04:35:00 CET 2006

On 24/10/2006 Ulrich P. Klein wrote:
> /usr/share/pycentral/python-mysqldb/site-packages/MySQLdb/converters.py,
> line 46:
> return apply(str, tuple(values))
> should be:
> return map(str, tuple(values))

Hello Ulrich,

Could you try the packages at

The debian package patches the Str2Set function:

--- python-mysqldb-1.2.1-p2/MySQLdb/converters.py
+++ python-mysqldb-1.2.1-p2/MySQLdb/converters.py
@@ -42,7 +42,8 @@
 def Bool2Str(s, d): return str(int(s))

 def Str2Set(s):
-    return Set([ i for i in s.split(',') if i ])
+    values = s.split(',')
+    return apply(str, tuple(values))

 def Set2Str(s, d):
     return string_literal(','.join(s), d)

The packages at http://people.debian.org/~mejo/python-mysqldb/ don't
have this patch applied.

I'm happy to use your patch, but i'm just interested whether the
original upstream fails for you too.


More information about the Python-modules-team mailing list