diff --git a/MySQLdb/MANIFEST.in b/MySQLdb/MANIFEST.in index a146fe4..89c53b5 100644 --- a/MySQLdb/MANIFEST.in +++ b/MySQLdb/MANIFEST.in @@ -1,5 +1,5 @@ prune CVS -recursive-include doc *.txt *.html *.css +recursive-include doc *.txt include MANIFEST.in include MANIFEST include ChangeLog diff --git a/MySQLdb/MySQLdb/converters.py b/MySQLdb/MySQLdb/converters.py index d03c3c2..902b0a4 100644 --- a/MySQLdb/MySQLdb/converters.py +++ b/MySQLdb/MySQLdb/converters.py @@ -42,7 +42,7 @@ import array def Bool2Str(s, d): return str(int(s)) def Str2Set(s): - return Set(s.split(',')) + return Set([ i for i in s.split(',') if i ]) def Set2Str(s, d): return string_literal(','.join(s), d) @@ -147,11 +147,11 @@ conversions = { (None, None), ], FIELD_TYPE.STRING: [ - (FLAG.BINARY, char_array), + (FLAG.SET, Str2Set), (None, None), ], FIELD_TYPE.VAR_STRING: [ - (FLAG.BINARY, char_array), + (FLAG.SET, Str2Set), (None, None), ], } diff --git a/MySQLdb/test_MySQLdb_capabilities.py b/MySQLdb/test_MySQLdb_capabilities.py index 5b80d49..25adc6d 100644 --- a/MySQLdb/test_MySQLdb_capabilities.py +++ b/MySQLdb/test_MySQLdb_capabilities.py @@ -37,7 +37,6 @@ class test_MySQLdb(test_capabilities.DatabaseTest): generator) def test_SET(self): - if True: return things = 'ash birch cedar larch pine'.split() def generator(row, col): from sets import Set @@ -46,7 +45,6 @@ class test_MySQLdb(test_capabilities.DatabaseTest): if (row >> i) & 1: s.add(things[i]) return s - self.debug = True self.check_data_integrity( ('col1 SET(%s)' % ','.join(["'%s'" % t for t in things]),), generator)