diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-08-16 22:20:53 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-08-16 22:20:53 -0400 |
| commit | 20fa7fe2b85d356e3da08191f01d7528ded42033 (patch) | |
| tree | dd98bed523dbad242ac1db901cee5ccda541a83c /lib/sqlalchemy | |
| parent | 0aff01bdfd7b9428334e862d5ff141b07298e75a (diff) | |
| download | sqlalchemy-20fa7fe2b85d356e3da08191f01d7528ded42033.tar.gz | |
- modernize most of the postgis example. would like to do [ticket:1534] also.
- we don't have coverage for type-wide instrumentation events, the listener was broke.
could break again too.
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/orm/events.py | 6 | ||||
| -rw-r--r-- | lib/sqlalchemy/schema.py | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/events.py b/lib/sqlalchemy/orm/events.py index 05f640ab0..25211d146 100644 --- a/lib/sqlalchemy/orm/events.py +++ b/lib/sqlalchemy/orm/events.py @@ -25,8 +25,9 @@ class InstrumentationEvents(event.Events): @classmethod def _accept_with(cls, target): + # TODO: there's no coverage for this if isinstance(target, type): - return orm.instrumentation.instrumentation_registry + return orm.instrumentation._instrumentation_factory else: return None @@ -36,7 +37,8 @@ class InstrumentationEvents(event.Events): @classmethod def _remove(cls, identifier, target, fn): - raise NotImplementedError("Removal of instrumentation events not yet implemented") + raise NotImplementedError("Removal of instrumentation events " + "not yet implemented") def class_instrument(self, cls): """Called after the given class is instrumented. diff --git a/lib/sqlalchemy/schema.py b/lib/sqlalchemy/schema.py index e79e12f7b..f2ca45894 100644 --- a/lib/sqlalchemy/schema.py +++ b/lib/sqlalchemy/schema.py @@ -408,6 +408,11 @@ class Table(SchemaItem, expression.TableClause): self, include_columns, exclude_columns ) + @util.memoized_property + def info(self): + """Dictionary provided for storage of additional information.""" + return {} + @property def _sorted_constraints(self): """Return the set of constraints as a list, sorted by creation order.""" @@ -965,6 +970,11 @@ class Column(SchemaItem, expression.ColumnClause): else: return self.description + @util.memoized_property + def info(self): + """Dictionary provided for storage of additional information.""" + return {} + def references(self, column): """Return True if this Column references the given column via foreign key.""" |
