diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-06-26 19:50:31 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-06-26 19:50:31 -0400 |
| commit | 1006f1705169310477db073c2b66af1d20615c38 (patch) | |
| tree | f9fda8c6cda67904330e62632403c029515794db | |
| parent | 48769a6a105cc2108d0f0570798b7787d5cda2a1 (diff) | |
| download | sqlalchemy-1006f1705169310477db073c2b66af1d20615c38.tar.gz | |
if python 2.4, have DontWrapException be old style
| -rw-r--r-- | lib/sqlalchemy/exc.py | 4 | ||||
| -rw-r--r-- | test/engine/test_execute.py | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/sqlalchemy/exc.py b/lib/sqlalchemy/exc.py index a7ea5b0e2..951e44d61 100644 --- a/lib/sqlalchemy/exc.py +++ b/lib/sqlalchemy/exc.py @@ -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 diff --git a/test/engine/test_execute.py b/test/engine/test_execute.py index 967fc9242..5f11684ba 100644 --- a/test/engine/test_execute.py +++ b/test/engine/test_execute.py @@ -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 |
