From: Mike Bayer Date: Wed, 4 Oct 2006 00:09:18 +0000 (+0000) Subject: continued cleanup X-Git-Tag: rel_0_3_0~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2eac1481f329e4226defde54973ba02d06df5b46;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git continued cleanup --- diff --git a/lib/sqlalchemy/orm/dependency.py b/lib/sqlalchemy/orm/dependency.py index 9c87eb0b34..3ce297d1c3 100644 --- a/lib/sqlalchemy/orm/dependency.py +++ b/lib/sqlalchemy/orm/dependency.py @@ -67,7 +67,6 @@ class DependencyProcessor(object): insert/update/delete order (topological sort).""" raise NotImplementedError() - # TODO: all of these preproc rules need to take dependencies into account def preprocess_dependencies(self, task, deplist, uowcommit, delete = False): """used before the flushes' topological sort to traverse through related objects and insure every instance which will require save/update/delete is properly added to the UOWTransaction.""" @@ -80,7 +79,7 @@ class DependencyProcessor(object): def _compile_synchronizers(self): """assembles a list of 'synchronization rules', which are instructions on how to populate - the objects on each side of a relationship. This is done when a PropertyLoader is + the objects on each side of a relationship. This is done when a DependencyProcessor is first initialized. The list of rules is used within commits by the _synchronize() method when dependent diff --git a/lib/sqlalchemy/orm/interfaces.py b/lib/sqlalchemy/orm/interfaces.py index ed48d40cf1..9a6b404a02 100644 --- a/lib/sqlalchemy/orm/interfaces.py +++ b/lib/sqlalchemy/orm/interfaces.py @@ -22,8 +22,6 @@ class MapperProperty(object): return [] def cascade_callable(self, type, object, callable_, recursive=None): return [] - def copy(self): - raise NotImplementedError() def get_criterion(self, query, key, value): """Returns a WHERE clause suitable for this MapperProperty corresponding to the given key/value pair, where the key is a column or object property name, and value @@ -46,9 +44,6 @@ class MapperProperty(object): def do_init(self): """template method for subclasses""" pass - def register_deleted(self, object, uow): - """called when the instance is being deleted""" - pass def register_dependencies(self, *args, **kwargs): """called by the Mapper in response to the UnitOfWork calling the Mapper's register_dependencies operation. Should register with the UnitOfWork all diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py index 163117e6ac..af39950390 100644 --- a/lib/sqlalchemy/orm/properties.py +++ b/lib/sqlalchemy/orm/properties.py @@ -5,8 +5,9 @@ # the MIT License: http://www.opensource.org/licenses/mit-license.php """defines a set of mapper.MapperProperty objects, including basic column properties as -well as relationships. also defines some MapperOptions that can be used with the -properties.""" +well as relationships. the objects rely upon the LoaderStrategy objects in the strategies.py +module to handle load operations. PropertyLoader also relies upon the dependency.py module +to handle flush-time dependency sorting and processing.""" from sqlalchemy import sql, schema, util, attributes, exceptions, sql_util, logging import mapper diff --git a/lib/sqlalchemy/orm/strategies.py b/lib/sqlalchemy/orm/strategies.py index 8459ba5396..9b25226404 100644 --- a/lib/sqlalchemy/orm/strategies.py +++ b/lib/sqlalchemy/orm/strategies.py @@ -11,6 +11,7 @@ import session as sessionlib import util as mapperutil import sets, random +"""sqlalchemy.orm.interfaces.LoaderStrategy implementations, and related MapperOptions.""" class ColumnLoader(LoaderStrategy): def init(self):