summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2023-04-12 23:41:19 +0000
committerGerrit Code Review <gerrit@bbpush.zzzcomputing.com>2023-04-12 23:41:19 +0000
commitb066c45dc491716a4e34bdeb9a9726bcbc136fb5 (patch)
treeae40a051b41f73d3587cb1f2785c85e810e89dc7 /lib/sqlalchemy/orm
parent53be3fc70a44d34fda1ffddcf9d67473d3de50b4 (diff)
parentee7e49964fcf13ed0f5a3541b81f00302a9db29a (diff)
downloadsqlalchemy-b066c45dc491716a4e34bdeb9a9726bcbc136fb5.tar.gz
Merge "Remove old versionadded and versionchanged" into main
Diffstat (limited to 'lib/sqlalchemy/orm')
-rw-r--r--lib/sqlalchemy/orm/_orm_constructors.py15
-rw-r--r--lib/sqlalchemy/orm/base.py5
-rw-r--r--lib/sqlalchemy/orm/events.py46
-rw-r--r--lib/sqlalchemy/orm/interfaces.py9
-rw-r--r--lib/sqlalchemy/orm/mapper.py14
-rw-r--r--lib/sqlalchemy/orm/query.py13
-rw-r--r--lib/sqlalchemy/orm/scoping.py4
-rw-r--r--lib/sqlalchemy/orm/session.py6
-rw-r--r--lib/sqlalchemy/orm/state.py11
-rw-r--r--lib/sqlalchemy/orm/strategy_options.py9
10 files changed, 2 insertions, 130 deletions
diff --git a/lib/sqlalchemy/orm/_orm_constructors.py b/lib/sqlalchemy/orm/_orm_constructors.py
index 1a1780158..a0fa4da79 100644
--- a/lib/sqlalchemy/orm/_orm_constructors.py
+++ b/lib/sqlalchemy/orm/_orm_constructors.py
@@ -993,11 +993,6 @@ def relationship(
in some cases can enable complex :func:`_orm.relationship` SQL
conditions to be used.
- .. versionadded:: 0.9.2 :paramref:`_orm.relationship.secondary`
- works
- more effectively when referring to a :class:`_expression.Join`
- instance.
-
:param active_history=False:
When ``True``, indicates that the "previous" value for a
many-to-one reference should be loaded when replaced, if
@@ -1132,12 +1127,6 @@ def relationship(
reducing performance of the innermost subquery beyond that of what
duplicate innermost rows may be causing.
- .. versionchanged:: 0.9.0 -
- :paramref:`_orm.relationship.distinct_target_key` now defaults to
- ``None``, so that the feature enables itself automatically for
- those cases where the innermost query targets a non-unique
- key.
-
.. seealso::
:ref:`loading_toplevel` - includes an introduction to subquery
@@ -1309,8 +1298,6 @@ def relationship(
remain associated with the attached :class:`.Session`, however
additional SELECT statements should be blocked.
- .. versionadded:: 1.1
-
* ``write_only`` - the attribute will be configured with a special
"virtual collection" that may receive
:meth:`_orm.WriteOnlyCollection.add` and
@@ -1849,8 +1836,6 @@ def synonym(
:param info: Optional data dictionary which will be populated into the
:attr:`.InspectionAttr.info` attribute of this object.
- .. versionadded:: 1.0.0
-
:param comparator_factory: A subclass of :class:`.PropComparator`
that will provide custom comparison behavior at the SQL expression
level.
diff --git a/lib/sqlalchemy/orm/base.py b/lib/sqlalchemy/orm/base.py
index 5b6675365..5d19cf20a 100644
--- a/lib/sqlalchemy/orm/base.py
+++ b/lib/sqlalchemy/orm/base.py
@@ -665,11 +665,6 @@ class InspectionAttrInfo(InspectionAttr):
:func:`.composite`
functions.
- .. versionchanged:: 1.0.0 :attr:`.MapperProperty.info` is also
- available on extension types via the
- :attr:`.InspectionAttrInfo.info` attribute, so that it can apply
- to a wider variety of ORM and extension constructs.
-
.. seealso::
:attr:`.QueryableAttribute.info`
diff --git a/lib/sqlalchemy/orm/events.py b/lib/sqlalchemy/orm/events.py
index 413bfbfcb..9a1fd569a 100644
--- a/lib/sqlalchemy/orm/events.py
+++ b/lib/sqlalchemy/orm/events.py
@@ -566,8 +566,6 @@ class InstanceEvents(event.Events[ClassManager[Any]]):
:meth:`.SessionEvents.pending_to_persistent` and
:meth:`.MapperEvents.after_insert` are better choices.
- .. versionadded:: 1.0.5
-
:param target: the mapped instance. If
the event is configured with ``raw=True``, this will
instead be the :class:`.InstanceState` state-management
@@ -1094,7 +1092,7 @@ class MapperEvents(event.Events[mapperlib.Mapper[Any]]):
@event.listens_for(Mapper, "before_configured")
def go():
- # ...
+ ...
Contrast this event to :meth:`.MapperEvents.after_configured`,
which is invoked after the series of mappers has been configured,
@@ -1114,10 +1112,7 @@ class MapperEvents(event.Events[mapperlib.Mapper[Any]]):
@event.listens_for(mapper, "before_configured", once=True)
def go():
- # ...
-
-
- .. versionadded:: 0.9.3
+ ...
.. seealso::
@@ -2205,8 +2200,6 @@ class SessionEvents(event.Events[Session]):
:param instance: the ORM-mapped instance being operated upon.
- .. versionadded:: 1.1
-
.. seealso::
:ref:`session_lifecycle_events`
@@ -2227,8 +2220,6 @@ class SessionEvents(event.Events[Session]):
:param instance: the ORM-mapped instance being operated upon.
- .. versionadded:: 1.1
-
.. seealso::
:ref:`session_lifecycle_events`
@@ -2248,8 +2239,6 @@ class SessionEvents(event.Events[Session]):
:param instance: the ORM-mapped instance being operated upon.
- .. versionadded:: 1.1
-
.. seealso::
:ref:`session_lifecycle_events`
@@ -2271,8 +2260,6 @@ class SessionEvents(event.Events[Session]):
:param instance: the ORM-mapped instance being operated upon.
- .. versionadded:: 1.1
-
.. seealso::
:ref:`session_lifecycle_events`
@@ -2308,8 +2295,6 @@ class SessionEvents(event.Events[Session]):
:param instance: the ORM-mapped instance being operated upon.
- .. versionadded:: 1.1
-
.. seealso::
:ref:`session_lifecycle_events`
@@ -2344,8 +2329,6 @@ class SessionEvents(event.Events[Session]):
:param instance: the ORM-mapped instance being operated upon.
- .. versionadded:: 1.1
-
.. seealso::
:ref:`session_lifecycle_events`
@@ -2377,8 +2360,6 @@ class SessionEvents(event.Events[Session]):
the :meth:`.SessionEvents.persistent_to_deleted` event is therefore
invoked at the end of a flush.
- .. versionadded:: 1.1
-
.. seealso::
:ref:`session_lifecycle_events`
@@ -2395,8 +2376,6 @@ class SessionEvents(event.Events[Session]):
:meth:`.Session.rollback`. The event is not called under
any other circumstances.
- .. versionadded:: 1.1
-
.. seealso::
:ref:`session_lifecycle_events`
@@ -2419,8 +2398,6 @@ class SessionEvents(event.Events[Session]):
events are called, as well as if the object is individually
expunged from its deleted state via :meth:`.Session.expunge`.
- .. versionadded:: 1.1
-
.. seealso::
:ref:`session_lifecycle_events`
@@ -2451,8 +2428,6 @@ class SessionEvents(event.Events[Session]):
to the detached state because it was marked as deleted and flushed.
- .. versionadded:: 1.1
-
.. seealso::
:ref:`session_lifecycle_events`
@@ -2792,10 +2767,6 @@ class AttributeEvents(event.Events[QueryableAttribute[Any]]):
from its original value by backref handlers in order to control
chained event propagation.
- .. versionchanged:: 0.9.0 the ``initiator`` argument is now
- passed as a :class:`.attributes.Event` object, and may be
- modified by backref handlers within a chain of backref-linked
- events.
:param key: When the event is established using the
:paramref:`.AttributeEvents.include_key` parameter set to
True, this will be the key used in the operation, such as
@@ -2841,11 +2812,6 @@ class AttributeEvents(event.Events[QueryableAttribute[Any]]):
from its original value by backref handlers in order to control
chained event propagation.
- .. versionchanged:: 0.9.0 the ``initiator`` argument is now
- passed as a :class:`.attributes.Event` object, and may be
- modified by backref handlers within a chain of backref-linked
- events.
-
:return: if the event was registered with ``retval=True``,
the given value, or a new effective value, should be returned.
@@ -2950,8 +2916,6 @@ class AttributeEvents(event.Events[QueryableAttribute[Any]]):
returned by the previous listener that specifies ``retval=True``
as the ``value`` argument of the next listener.
- .. versionadded:: 1.1
-
:param target: the object instance receiving the event.
If the listener is registered with ``raw=True``, this will
be the :class:`.InstanceState` object.
@@ -3013,9 +2977,6 @@ class AttributeEvents(event.Events[QueryableAttribute[Any]]):
:param collection_adapter: the :class:`.CollectionAdapter` that will
mediate internal access to the collection.
- .. versionadded:: 1.0.0 :meth:`.AttributeEvents.init_collection`
- and :meth:`.AttributeEvents.dispose_collection` events.
-
.. seealso::
:class:`.AttributeEvents` - background on listener options such
@@ -3048,9 +3009,6 @@ class AttributeEvents(event.Events[QueryableAttribute[Any]]):
contents before the dispose intact; previously, the collection
would be empty.
- .. versionadded:: 1.0.0 the :meth:`.AttributeEvents.init_collection`
- and :meth:`.AttributeEvents.dispose_collection` events.
-
.. seealso::
:class:`.AttributeEvents` - background on listener options such
diff --git a/lib/sqlalchemy/orm/interfaces.py b/lib/sqlalchemy/orm/interfaces.py
index 2af883da2..4da8f63e6 100644
--- a/lib/sqlalchemy/orm/interfaces.py
+++ b/lib/sqlalchemy/orm/interfaces.py
@@ -407,10 +407,6 @@ class MapperProperty(
:func:`.column_property`, :func:`_orm.relationship`, or :func:`.composite`
functions.
- .. versionchanged:: 1.0.0 :attr:`.InspectionAttr.info` moved
- from :class:`.MapperProperty` so that it can apply to a wider
- variety of ORM and extension constructs.
-
.. seealso::
:attr:`.QueryableAttribute.info`
@@ -429,11 +425,6 @@ class MapperProperty(
:func:`.composite`
functions.
- .. versionchanged:: 1.0.0 :attr:`.MapperProperty.info` is also
- available on extension types via the
- :attr:`.InspectionAttrInfo.info` attribute, so that it can apply
- to a wider variety of ORM and extension constructs.
-
.. seealso::
:attr:`.QueryableAttribute.info`
diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py
index 2ae6dadcd..81b66de03 100644
--- a/lib/sqlalchemy/orm/mapper.py
+++ b/lib/sqlalchemy/orm/mapper.py
@@ -344,10 +344,6 @@ class Mapper(
those rows automatically. The warning may be changed to an
exception in a future release.
- .. versionadded:: 0.9.4 - added
- :paramref:`.mapper.confirm_deleted_rows` as well as conditional
- matched row checking on delete.
-
:param eager_defaults: if True, the ORM will immediately fetch the
value of server-generated default values after an INSERT or UPDATE,
rather than leaving them as expired to be fetched on next access.
@@ -381,9 +377,6 @@ class Mapper(
:ref:`orm_server_defaults`
- .. versionchanged:: 0.9.0 The ``eager_defaults`` option can now
- make use of :term:`RETURNING` for backends which support it.
-
.. versionchanged:: 2.0.0 RETURNING now works with multiple rows
INSERTed at once using the
:ref:`insertmanyvalues <engine_insertmanyvalues>` feature, which
@@ -478,8 +471,6 @@ class Mapper(
to specify passive_deletes without this taking effect for
all subclass mappers.
- .. versionadded:: 1.1
-
.. seealso::
:ref:`passive_deletes` - description of similar feature as
@@ -694,9 +685,6 @@ class Mapper(
Please see :ref:`server_side_version_counter` for a discussion
of important points when using this option.
- .. versionadded:: 0.9.0 ``version_id_generator`` supports
- server-side version number generation.
-
.. seealso::
:ref:`custom_version_counter`
@@ -4338,8 +4326,6 @@ def validates(
:func:`.validates` usage where only one validator should emit per
attribute operation.
- .. versionadded:: 0.9.0
-
.. seealso::
:ref:`simple_validators` - usage examples for :func:`.validates`
diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py
index 080ae27ef..5cd7cc117 100644
--- a/lib/sqlalchemy/orm/query.py
+++ b/lib/sqlalchemy/orm/query.py
@@ -2432,8 +2432,6 @@ class Query(
:param full=False: render FULL OUTER JOIN; implies ``isouter``.
- .. versionadded:: 1.1
-
"""
join_target = coercions.expect(
@@ -2531,13 +2529,6 @@ class Query(
:class:`.AliasedClass` objects, :class:`.Mapper` objects
as well as core :class:`.FromClause` elements like subqueries.
- .. versionchanged:: 0.9
- This method no longer applies the given FROM object
- to be the selectable from which matching entities
- select from; the :meth:`.select_entity_from` method
- now accomplishes this. See that method for a description
- of this behavior.
-
.. seealso::
:meth:`~.Query.join`
@@ -2764,10 +2755,6 @@ class Query(
results in an execution of the
underlying query.
- .. versionadded:: 1.0.9
-
- Added :meth:`_query.Query.one_or_none`
-
.. seealso::
:meth:`_query.Query.first`
diff --git a/lib/sqlalchemy/orm/scoping.py b/lib/sqlalchemy/orm/scoping.py
index 787c5a4ab..19217ec32 100644
--- a/lib/sqlalchemy/orm/scoping.py
+++ b/lib/sqlalchemy/orm/scoping.py
@@ -1425,10 +1425,6 @@ class scoped_session(Generic[_S]):
See :ref:`unitofwork_merging` for a detailed discussion of merging.
- .. versionchanged:: 1.1 - :meth:`.Session.merge` will now reconcile
- pending objects with overlapping primary keys in the same way
- as persistent. See :ref:`change_3601` for discussion.
-
:param instance: Instance to be merged.
:param load: Boolean, when False, :meth:`.merge` switches into
a "high performance" mode which causes it to forego emitting history
diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py
index 760c71afd..e6d6251cf 100644
--- a/lib/sqlalchemy/orm/session.py
+++ b/lib/sqlalchemy/orm/session.py
@@ -934,8 +934,6 @@ class SessionTransaction(_StateChange, TransactionalContext):
:attr:`.SessionTransaction.nested` attribute is ``True``, then
this is a SAVEPOINT, and if ``False``, indicates this a subtransaction.
- .. versionadded:: 1.0.16 - use ._parent for previous versions
-
"""
return self._parent
@@ -3704,10 +3702,6 @@ class Session(_SessionClassMethods, EventTarget):
See :ref:`unitofwork_merging` for a detailed discussion of merging.
- .. versionchanged:: 1.1 - :meth:`.Session.merge` will now reconcile
- pending objects with overlapping primary keys in the same way
- as persistent. See :ref:`change_3601` for discussion.
-
:param instance: Instance to be merged.
:param load: Boolean, when False, :meth:`.merge` switches into
a "high performance" mode which causes it to forego emitting history
diff --git a/lib/sqlalchemy/orm/state.py b/lib/sqlalchemy/orm/state.py
index 840de6ff1..708939531 100644
--- a/lib/sqlalchemy/orm/state.py
+++ b/lib/sqlalchemy/orm/state.py
@@ -278,9 +278,6 @@ class InstanceState(interfaces.InspectionAttrInfo, Generic[_O]):
or via transaction commit and enters the "detached" state,
this flag will continue to report True.
- .. versionadded:: 1.1 - added a local method form of
- :func:`.orm.util.was_deleted`.
-
.. seealso::
:attr:`.InstanceState.deleted` - refers to the "deleted" state
@@ -300,12 +297,6 @@ class InstanceState(interfaces.InspectionAttrInfo, Generic[_O]):
be within the :attr:`.Session.identity_map` of its parent
:class:`.Session`.
- .. versionchanged:: 1.1 The :attr:`.InstanceState.persistent`
- accessor no longer returns True for an object that was
- "deleted" within a flush; use the :attr:`.InstanceState.deleted`
- accessor to detect this state. This allows the "persistent"
- state to guarantee membership in the identity map.
-
.. seealso::
:ref:`session_object_states`
@@ -1104,8 +1095,6 @@ class AttributeState:
:func:`.attributes.get_history` - underlying function
- .. versionadded:: 0.9.0
-
"""
return self.state.get_history(self.key, PASSIVE_OFF ^ INIT_OK)
diff --git a/lib/sqlalchemy/orm/strategy_options.py b/lib/sqlalchemy/orm/strategy_options.py
index ba4b12061..48e69aef2 100644
--- a/lib/sqlalchemy/orm/strategy_options.py
+++ b/lib/sqlalchemy/orm/strategy_options.py
@@ -295,12 +295,6 @@ class _AbstractLoad(traversals.GenerativeOnTraversal, LoaderOption):
correctness of results, these joins are always INNER and are
therefore right-nested if linked to an OUTER join.
- .. versionchanged:: 1.0.0 ``innerjoin=True`` now implies
- ``innerjoin="nested"``, whereas in 0.9 it implied
- ``innerjoin="unnested"``. In order to achieve the pre-1.0
- "unnested" inner join behavior, use the value
- ``innerjoin="unnested"``. See :ref:`migration_3008`.
-
.. note::
The joins produced by :func:`_orm.joinedload` are **anonymously
@@ -532,9 +526,6 @@ class _AbstractLoad(traversals.GenerativeOnTraversal, LoaderOption):
This function is part of the :class:`_orm.Load` interface and supports
both method-chained and standalone operation.
-
- .. versionadded:: 1.1
-
.. seealso::
:ref:`loading_toplevel`