Commits

Anonymous committed 4f2f90e

make ProxyImpl a top-level class (this makes it importable by FormAlchemy, making reverse-engineering synonyms a bit easier)

Comments (0)

Files changed (1)

lib/sqlalchemy/orm/attributes.py

             return self
         return self.impl.get(instance_state(instance))
 
+class _ProxyImpl(object):
+    accepts_scalar_loader = False
+
+    def __init__(self, key):
+        self.key = key
+
 def proxied_attribute_factory(descriptor):
     """Create an InstrumentedAttribute / user descriptor hybrid.
 
     behavior and getattr() to the given descriptor.
     """
 
-    class ProxyImpl(object):
-        accepts_scalar_loader = False
-
-        def __init__(self, key):
-            self.key = key
-
     class Proxy(InstrumentedAttribute):
         """A combination of InsturmentedAttribute and a regular descriptor."""
 
             self.descriptor = self.user_prop = descriptor
             self._comparator = comparator
             self._parententity = parententity
-            self.impl = ProxyImpl(key)
+            self.impl = _ProxyImpl(key)
 
         def comparator(self):
             if callable(self._comparator):