]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- fixes for mysql and I'm ready to replace this whole adapt() business with a constru...
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 15 Dec 2010 00:24:17 +0000 (19:24 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 15 Dec 2010 00:24:17 +0000 (19:24 -0500)
lib/sqlalchemy/dialects/mysql/base.py
lib/sqlalchemy/engine/default.py

index fd99a16b55aea9e80354eea49e949620f9555d78..5c3289bfb020107a4ac572d927e63611f02c8f36 100644 (file)
@@ -965,6 +965,10 @@ class ENUM(sqltypes.Enum, _StringType):
             else:
                 return value
         return process
+    
+    def adapt(self, impltype, **kw):
+        kw['strict'] = self.strict
+        return sqltypes.Enum.adapt(self, impltype, **kw)
 
 class SET(_StringType):
     """MySQL SET type."""
index b432c351d648d551a55c5665a8d4b5f6b85608fd..ae0625d30feb5aee7cbfbb987081c39f312aedee 100644 (file)
@@ -135,14 +135,16 @@ class DefaultDialect(base.Dialect):
                     (label_length, self.max_identifier_length))
         self.label_length = label_length
         
-        self._type_memos = weakref.WeakKeyDictionary()
-        
         if not hasattr(self, 'description_encoding'):
             self.description_encoding = getattr(
                                             self, 
                                             'description_encoding', 
                                             encoding)
     
+    @util.memoized_property
+    def _type_memos(self):
+        return weakref.WeakKeyDictionary()
+        
     @property
     def dialect_description(self):
         return self.name + "+" + self.driver