Uploaded image for project: 'Motor'
  1. Motor
  2. MOTOR-440

Add session parameter to GridOut class

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.1
    • Affects Version/s: None
    • Component/s: None
    • None

      AgnosticGridOut is missing a "session" parameter:

      class AgnosticGridOut(object):
          def __init__(
              self,
              root_collection,
              file_id=None,
              file_document=None,
              delegate=None,
          ):
      

      This causes the following synchro test failure:

       [2019/10/24 15:14:30.081] ERROR: test_alt_collection (test.test_gridfs_bucket.TestGridfs)
       [2019/10/24 15:14:30.081] ----------------------------------------------------------------------
       [2019/10/24 15:14:30.081] Traceback (most recent call last):
       [2019/10/24 15:14:30.081]   File "/data/mci/6ba00614a2279a83cbe73498853dcce9/src/.tox/synchro37/tmp/mongo-python-driver/test/test_gridfs_bucket.py", line 168, in test_alt_collection
       [2019/10/24 15:14:30.081]     self.alt.open_download_stream(oid).read())
       [2019/10/24 15:14:30.081]   File "/data/mci/6ba00614a2279a83cbe73498853dcce9/src/.tox/synchro37/tmp/mongo-python-driver/gridfs/__init__.py", line 690, in open_download_stream
       [2019/10/24 15:14:30.081]     gout = GridOut(self._collection, file_id, session=session)
       [2019/10/24 15:14:30.081] TypeError: __init__() got an unexpected keyword argument 'session'
      

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: