summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/session.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-06-08 14:35:24 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-06-08 14:35:24 -0400
commit60694d6052618ab732b36d75016ed337fe341603 (patch)
treeaca7e7b3b9c4dc97e7d335c6be90ae4115b43353 /lib/sqlalchemy/orm/session.py
parent9bb57bd9efa138fd5cd53964ed80fcfd93553121 (diff)
downloadsqlalchemy-60694d6052618ab732b36d75016ed337fe341603.tar.gz
- [feature] The 'objects' argument to
flush() is no longer deprecated, as some valid use cases have been identified.
Diffstat (limited to 'lib/sqlalchemy/orm/session.py')
-rw-r--r--lib/sqlalchemy/orm/session.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py
index 7f820aa05..432c43898 100644
--- a/lib/sqlalchemy/orm/session.py
+++ b/lib/sqlalchemy/orm/session.py
@@ -1629,20 +1629,15 @@ class Session(object):
will create a transaction on the fly that surrounds the entire set of
operations int the flush.
- objects
- Optional; a list or tuple collection. Restricts the flush operation
- to only these objects, rather than all pending changes.
- Deprecated - this flag prevents the session from properly maintaining
- accounting among inter-object relations and can cause invalid results.
+ :param objects: Optional; restricts the flush operation to operate
+ only on elements that are in the given collection.
+
+ This feature is for an extremely narrow set of use cases where
+ particular objects may need to be operated upon before the
+ full flush() occurs. It is not intended for general use.
"""
- if objects:
- util.warn_deprecated(
- "The 'objects' argument to session.flush() is deprecated; "
- "Please do not add objects to the session which should not "
- "yet be persisted.")
-
if self._flushing:
raise sa_exc.InvalidRequestError("Session is already flushing")