summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2020-11-14 14:35:23 +0000
committerGerrit Code Review <gerrit@bbpush.zzzcomputing.com>2020-11-14 14:35:23 +0000
commitbddb1070f9fa846233255fd0acd5316404560de1 (patch)
tree733dca324fdbaa89488d7dbb7749ad08f050a95f /lib/sqlalchemy
parent415ddce1e3b429bdc1180c5b5f7750a08d226525 (diff)
parentf18316a14f3858acfd3e813753c2c69821a27d57 (diff)
downloadsqlalchemy-bddb1070f9fa846233255fd0acd5316404560de1.tar.gz
Merge "Some small improvements on the tutorial 2.0 documents"
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/orm/__init__.py15
-rw-r--r--lib/sqlalchemy/orm/attributes.py7
-rw-r--r--lib/sqlalchemy/sql/dml.py2
-rw-r--r--lib/sqlalchemy/sql/selectable.py2
4 files changed, 22 insertions, 4 deletions
diff --git a/lib/sqlalchemy/orm/__init__.py b/lib/sqlalchemy/orm/__init__.py
index e36797d47..7d35856f3 100644
--- a/lib/sqlalchemy/orm/__init__.py
+++ b/lib/sqlalchemy/orm/__init__.py
@@ -16,6 +16,10 @@ documentation for an overview of how this module is used.
from . import exc # noqa
from . import mapper as mapperlib # noqa
from . import strategy_options
+from .attributes import AttributeEvent # noqa
+from .attributes import InstrumentedAttribute # noqa
+from .attributes import QueryableAttribute # noqa
+from .context import QueryContext # noqa
from .decl_api import as_declarative # noqa
from .decl_api import declarative_base # noqa
from .decl_api import declared_attr # noqa
@@ -24,14 +28,21 @@ from .decl_api import registry # noqa
from .decl_api import synonym_for # noqa
from .descriptor_props import CompositeProperty # noqa
from .descriptor_props import SynonymProperty # noqa
+from .identity import IdentityMap # noqa
+from .instrumentation import ClassManager # noqa
from .interfaces import EXT_CONTINUE # noqa
from .interfaces import EXT_SKIP # noqa
from .interfaces import EXT_STOP # noqa
+from .interfaces import InspectionAttr # noqa
+from .interfaces import InspectionAttrInfo # noqa
from .interfaces import MANYTOMANY # noqa
from .interfaces import MANYTOONE # noqa
from .interfaces import MapperProperty # noqa
+from .interfaces import NOT_EXTENSION # noqa
from .interfaces import ONETOMANY # noqa
from .interfaces import PropComparator # noqa
+from .loading import merge_frozen_result # noqa
+from .loading import merge_result # noqa
from .mapper import _mapper_registry
from .mapper import class_mapper # noqa
from .mapper import configure_mappers # noqa
@@ -54,9 +65,13 @@ from .session import ORMExecuteState # noqa
from .session import Session # noqa
from .session import sessionmaker # noqa
from .session import SessionTransaction # noqa
+from .state import AttributeState # noqa
+from .state import InstanceState # noqa
from .strategy_options import Load # noqa
+from .unitofwork import UOWTransaction # noqa
from .util import aliased # noqa
from .util import Bundle # noqa
+from .util import CascadeOptions # noqa
from .util import join # noqa
from .util import LoaderCriteriaOption # noqa
from .util import object_mapper # noqa
diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py
index c7ef97c6c..4280cb76e 100644
--- a/lib/sqlalchemy/orm/attributes.py
+++ b/lib/sqlalchemy/orm/attributes.py
@@ -512,7 +512,7 @@ OP_BULK_REPLACE = util.symbol("BULK_REPLACE")
OP_MODIFIED = util.symbol("MODIFIED")
-class Event(object):
+class AttributeEvent(object):
"""A token propagated throughout the course of a chain of attribute
events.
@@ -549,7 +549,7 @@ class Event(object):
def __eq__(self, other):
return (
- isinstance(other, Event)
+ isinstance(other, AttributeEvent)
and other.impl is self.impl
and other.op == self.op
)
@@ -562,6 +562,9 @@ class Event(object):
return self.impl.hasparent(state)
+Event = AttributeEvent
+
+
class AttributeImpl(object):
"""internal implementation for instrumented attributes."""
diff --git a/lib/sqlalchemy/sql/dml.py b/lib/sqlalchemy/sql/dml.py
index 51a81fe02..b755eef73 100644
--- a/lib/sqlalchemy/sql/dml.py
+++ b/lib/sqlalchemy/sql/dml.py
@@ -1040,7 +1040,7 @@ class DMLWhereBase(object):
"""
- for criterion in list(whereclause):
+ for criterion in whereclause:
where_criteria = coercions.expect(roles.WhereHavingRole, criterion)
self._where_criteria += (where_criteria,)
diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py
index b5dbed1a9..086cef48a 100644
--- a/lib/sqlalchemy/sql/selectable.py
+++ b/lib/sqlalchemy/sql/selectable.py
@@ -4988,7 +4988,7 @@ class Select(
assert isinstance(self._where_criteria, tuple)
- for criterion in list(whereclause):
+ for criterion in whereclause:
where_criteria = coercions.expect(roles.WhereHavingRole, criterion)
self._where_criteria += (where_criteria,)