]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
if python 2.4, have DontWrapException be old style
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 26 Jun 2011 23:50:31 +0000 (19:50 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 26 Jun 2011 23:50:31 +0000 (19:50 -0400)
lib/sqlalchemy/exc.py
test/engine/test_execute.py

index a7ea5b0e2251de04f7f09596f77f0364034a65ff..951e44d61a5d9bda251d7b13fe6c30c578fd1bc9 100644 (file)
@@ -118,6 +118,10 @@ class DontWrapMixin(object):
                     raise MyCustomException("invalid!")
             
     """
+import sys
+if sys.version_info < (2, 5):
+    class DontWrapMixin:
+        pass
 
 # Moved to orm.exc; compatibility definition installed by orm import until 0.6
 UnmappedColumnError = None
index 967fc92426d37701f97adf90eb351d7e022dfb61..5f11684ba05bf9e01e70bc6005544a298770eab2 100644 (file)
@@ -188,7 +188,6 @@ class ExecuteTest(fixtures.TestBase):
         finally:
             conn.close()
 
-    @testing.requires.python25
     def test_dont_wrap_mixin(self):
         class MyException(Exception, tsa.exc.DontWrapMixin):
             pass