From 3c49e8a0f76d97f46de4eac3a23af32999ca9395 Mon Sep 17 00:00:00 2001 From: "A. Jesse Jiryu Davis" Date: Fri, 1 Sep 2017 16:20:36 -0400 Subject: [PATCH] PYTHON-1362 - Useless check in aggregate_raw_batches The method had checked whether any SON manipulators were configured, and raised an error if so. But users should understand that SON manipulators can't affect raw batches, and checking for them raises a deprecation warning. --- pymongo/command_cursor.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pymongo/command_cursor.py b/pymongo/command_cursor.py index 0a628c5a6..a6e692675 100644 --- a/pymongo/command_cursor.py +++ b/pymongo/command_cursor.py @@ -206,10 +206,6 @@ class CommandCursor(object): return len(self.__data) - @property - def _collection(self): - return self.__collection - @property def alive(self): """Does this cursor have the potential to return more data? @@ -276,11 +272,6 @@ class RawBatchCommandCursor(CommandCursor): super(RawBatchCommandCursor, self).__init__( collection, cursor_info, address, retrieved) - db = self._collection.database - if db.outgoing_manipulators or db.outgoing_copying_manipulators: - raise InvalidOperation("Raw batches are not compatible with" - " SON manipulators.") - def _unpack_response(self, response, cursor_id, codec_options): return helpers._raw_response(response, cursor_id)