]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- [feature] The 'objects' argument to
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 8 Jun 2012 18:35:24 +0000 (14:35 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 8 Jun 2012 18:35:24 +0000 (14:35 -0400)
flush() is no longer deprecated, as some
valid use cases have been identified.

CHANGES
lib/sqlalchemy/orm/session.py

diff --git a/CHANGES b/CHANGES
index 89825af9553afd87c2775efc6acddc14da58487b..a57f0aa87ac5cea491037bfbdc8be9f4a4b8e4ae 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -131,6 +131,11 @@ CHANGES
     to be part of that, this is [ticket:2491].
     Also in 0.7.8.
 
+  - [feature] The 'objects' argument to 
+    flush() is no longer deprecated, as some
+    valid use cases have been identified.  
+    Also in 0.7.8.
+
   - [feature] Query now "auto correlates" by 
     default in the same way as select() does.
     Previously, a Query used as a subquery
index 7f820aa057b76b36faa3d5d7b8d9d67418f232d9..432c43898a379d9a007c92e56bec1fef6173d927 100644 (file)
@@ -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")