From: Mike Bayer Date: Sun, 20 May 2012 13:40:55 +0000 (-0400) Subject: looks like I finally stepped on someone elses dunders...will have to figure out X-Git-Tag: rel_0_8_0b1~414 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b94db2cad013494446d5af90067ac6b1272e7b7;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git looks like I finally stepped on someone elses dunders...will have to figure out how to make a public API for this anyway --- diff --git a/lib/sqlalchemy/ext/declarative.py b/lib/sqlalchemy/ext/declarative.py index 6ed6d96f43..25dd72b240 100755 --- a/lib/sqlalchemy/ext/declarative.py +++ b/lib/sqlalchemy/ext/declarative.py @@ -1316,7 +1316,7 @@ def _as_declarative(cls, classname, dict_): column_copies, our_stuff, mapper_args_fn) - if not hasattr(cls, '__prepare__'): + if not hasattr(cls, '_sa_decl_prepare'): mt.map() class _MapperConfig(object): @@ -1914,11 +1914,11 @@ class DeferredReflection(object): to_map = [m for m in _MapperConfig.configs.values() if issubclass(m.cls, cls)] for thingy in to_map: - cls.__prepare__(thingy.local_table, engine) + cls._sa_decl_prepare(thingy.local_table, engine) thingy.map() @classmethod - def __prepare__(cls, local_table, engine): + def _sa_decl_prepare(cls, local_table, engine): # autoload Table, which is already # present in the metadata. This # will fill in db-loaded columns