]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix the enum for MySQL after native_enum added to adaption keys
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 9 Jun 2010 22:27:43 +0000 (18:27 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 9 Jun 2010 22:27:43 +0000 (18:27 -0400)
lib/sqlalchemy/dialects/mysql/base.py
test/sql/test_types.py

index 619bbb3ced76fb23bd20a983bc7e4daf95622d18..179e0c76d89c17e4f64210e6150867b437a0d25e 100644 (file)
@@ -907,7 +907,7 @@ class ENUM(sqltypes.Enum, _StringType):
 
         """
         self.quoting = kw.pop('quoting', 'auto')
-
+        
         if self.quoting == 'auto' and len(enums):
             # What quoting character are we using?
             q = None
@@ -937,6 +937,7 @@ class ENUM(sqltypes.Enum, _StringType):
         kw.pop('schema', None)
         kw.pop('name', None)
         kw.pop('quote', None)
+        kw.pop('native_enum', None)
         _StringType.__init__(self, length=length, **kw)
         sqltypes.Enum.__init__(self, *enums)
     
index 23e1ebec6a228ca8c045837f0c28ebdce284c5cc..91e4ec177afbe1e5d093030b32e344a0c5102316 100644 (file)
@@ -573,8 +573,6 @@ class EnumTest(TestBase):
         eq_(e1.adapt(ENUM).name, 'foo')
         eq_(e1.adapt(ENUM).schema, 'bar')
         
-        
-        
     @testing.fails_on('mysql+mysqldb', "MySQL seems to issue a 'data truncated' warning.")
     def test_constraint(self):
         assert_raises(exc.DBAPIError,