Commits

Mike Bayer committed 9947f22

fix import here

  • Participants
  • Parent commits 5fd3d8e

Comments (0)

Files changed (2)

File lib/sqlalchemy/ext/associationproxy.py

 import itertools
 import operator
 import weakref
-from sqlalchemy import exceptions
+from sqlalchemy import exc
 from sqlalchemy import orm
 from sqlalchemy import util
 from sqlalchemy.orm import collections, ColumnProperty
         elif self.collection_class is set:
             return _AssociationSet(lazy_collection, creator, getter, setter, self)
         else:
-            raise exceptions.ArgumentError(
+            raise exc.ArgumentError(
                 'could not guess which interface to use for '
                 'collection_class "%s" backing "%s"; specify a '
                 'proxy_factory and proxy_bulk_set manually' %
         elif self.collection_class is set:
             proxy.update(values)
         else:
-            raise exceptions.ArgumentError(
+            raise exc.ArgumentError(
                'no proxy_bulk_set supplied for custom '
                'collection_class implementation')
 
     def __call__(self):
         obj = self.ref()
         if obj is None:
-            raise exceptions.InvalidRequestError(
+            raise exc.InvalidRequestError(
                "stale association proxy, parent object has gone out of "
                "scope")
         return getattr(obj, self.target)

File test/ext/test_associationproxy.py

     def test_filter_scalar_contains_fails_nul_nul(self):
         Keyword = self.classes.Keyword
 
-        assert_raises(exceptions.InvalidRequestError, lambda : \
+        assert_raises(exc.InvalidRequestError, lambda : \
                       Keyword.user.contains(self.u))
 
     def test_filter_scalar_any_fails_nul_nul(self):
         Keyword = self.classes.Keyword
 
-        assert_raises(exceptions.InvalidRequestError, lambda : \
+        assert_raises(exc.InvalidRequestError, lambda : \
                       Keyword.user.any(name='user2'))
 
     def test_filter_collection_has_fails_ul_nul(self):
         User = self.classes.User
 
-        assert_raises(exceptions.InvalidRequestError, lambda : \
+        assert_raises(exc.InvalidRequestError, lambda : \
                       User.keywords.has(keyword='quick'))
 
     def test_filter_collection_eq_fails_ul_nul(self):
         User = self.classes.User
 
-        assert_raises(exceptions.InvalidRequestError, lambda : \
+        assert_raises(exc.InvalidRequestError, lambda : \
                       User.keywords == self.kw)
 
     def test_filter_collection_ne_fails_ul_nul(self):
         User = self.classes.User
 
-        assert_raises(exceptions.InvalidRequestError, lambda : \
+        assert_raises(exc.InvalidRequestError, lambda : \
                       User.keywords != self.kw)
 
     def test_join_separate_attr(self):