[SQL-CVS] r1322 - SQLObject/trunk/sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: <sub...@co...> - 2005-11-26 21:43:31
|
Author: ianb
Date: 2005-11-26 21:43:25 +0000 (Sat, 26 Nov 2005)
New Revision: 1322
Modified:
SQLObject/trunk/sqlobject/main.py
Log:
Move the attribute setup until later, so that some class fixups occur before __addtoclass__ is called
Modified: SQLObject/trunk/sqlobject/main.py
===================================================================
--- SQLObject/trunk/sqlobject/main.py 2005-11-26 21:13:23 UTC (rev 1321)
+++ SQLObject/trunk/sqlobject/main.py 2005-11-26 21:43:25 UTC (rev 1322)
@@ -701,8 +701,6 @@
def __classinit__(cls, new_attrs):
- declarative.setup_attributes(cls, new_attrs)
-
# This is true if we're initializing the SQLObject class,
# instead of a subclass:
is_base = cls.__bases__ == (object,)
@@ -800,6 +798,10 @@
if connection and not hasattr(cls, '_connection'):
cls.setConnection(connection)
+ # Now the class is in an essentially OK-state, so we can
+ # set up any magic attributes:
+ declarative.setup_attributes(cls, new_attrs)
+
# We have to check if there are columns in the inherited
# _columns where the attribute has been set to None in this
# class. If so, then we need to remove that column from
|