From: Mike Bayer Date: Sat, 6 Nov 2010 15:49:45 +0000 (-0400) Subject: - merge tip X-Git-Tag: rel_0_7b1~253^2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e2c0f10cd164511b9c6377b72a8c0527e4eb716;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - merge tip --- 4e2c0f10cd164511b9c6377b72a8c0527e4eb716 diff --cc examples/custom_attributes/custom_management.py index 03d38c26aa,34481b6235..2e2689140c --- a/examples/custom_attributes/custom_management.py +++ b/examples/custom_attributes/custom_management.py @@@ -1,21 -1,24 +1,25 @@@ - """this example illustrates how to replace SQLAlchemy's class descriptors with a user-defined system. + """this example illustrates how to replace SQLAlchemy's class descriptors with + a user-defined system. - This sort of thing is appropriate for integration with frameworks that redefine class behaviors - in their own way, such that SQLA's default instrumentation is not compatible. + This sort of thing is appropriate for integration with frameworks that + redefine class behaviors in their own way, such that SQLA's default + instrumentation is not compatible. - The example illustrates redefinition of instrumentation at the class level as well as the collection - level, and redefines the storage of the class to store state within "instance._goofy_dict" instead - of "instance.__dict__". Note that the default collection implementations can be used - with a custom attribute system as well. + The example illustrates redefinition of instrumentation at the class level as + well as the collection level, and redefines the storage of the class to store + state within "instance._goofy_dict" instead of "instance.__dict__". Note that + the default collection implementations can be used with a custom attribute + system as well. """ - from sqlalchemy import (create_engine, MetaData, Table, Column, Integer, Text, - ForeignKey) - from sqlalchemy.orm import (mapper, relationship, create_session, - InstrumentationManager) + from sqlalchemy import create_engine, MetaData, Table, Column, Integer, Text,\ + ForeignKey + from sqlalchemy.orm import mapper, relationship, Session,\ + InstrumentationManager - from sqlalchemy.orm.attributes import set_attribute, get_attribute, del_attribute + from sqlalchemy.orm.attributes import set_attribute, get_attribute, \ - del_attribute, is_instrumented ++ del_attribute +from sqlalchemy.orm.instrumentation import is_instrumented from sqlalchemy.orm.collections import collection_adapter diff --cc lib/sqlalchemy/test/engines.py index 8b930175fe,870f984ecf..acae1d28a6 --- a/lib/sqlalchemy/test/engines.py +++ b/lib/sqlalchemy/test/engines.py @@@ -1,8 -1,7 +1,8 @@@ import sys, types, weakref from collections import deque - import config + from sqlalchemy_nose import config from sqlalchemy.util import function_named, callable +from sqlalchemy import event import re import warnings