-
Type: Task
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Tests
-
None
There are a number of tests that fail with pymongo 3.8.
The internal LIFO connection pool change in PYTHON-1663 causes test_reconnect_in_case_connection_closed_by_mongo to fail:
====================================================================== ERROR: test_reconnect_in_case_connection_closed_by_mongo (asyncio_tests.test_asyncio_client.TestAsyncIOClient) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/shane/git/motor/test/asyncio_tests/__init__.py", line 48, in __call__ result = self.orig_method() File "/Users/shane/git/motor/test/asyncio_tests/__init__.py", line 226, in wrapped self.loop.run_until_complete(task) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 573, in run_until_complete return future.result() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/tasks.py", line 416, in wait_for return fut.result() File "/Users/shane/git/motor/test/asyncio_tests/test_asyncio_client.py", line 106, in test_reconnect_in_case_connection_closed_by_mongo pool.sockets.add(socket) AttributeError: 'collections.deque' object has no attribute 'add'
PYTHON-1783 added the Database.with_options API:
FAIL: test_database_attrs (tornado_tests.test_motor_core.MotorCoreTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/shane/git/motor/venv3.7/lib/python3.7/site-packages/tornado/testing.py", line 98, in __call__ result = self.orig_method(*args, **kwargs) File "/Users/shane/git/motor/test/tornado_tests/test_motor_core.py", line 106, in test_database_attrs attrs(self.cx.test) - motor_only) AssertionError: Items in the first set but not the second: 'with_options'
And PYTHON-1695 added extra methods to GridOut/GridIn to make them more closely implement io.IOBase and allow them to be wrapped with zipfile.ZipFile:
FAIL: test_gridin_attrs (tornado_tests.test_motor_core.MotorCoreTestGridFS) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/shane/git/motor/venv3.7/lib/python3.7/site-packages/tornado/testing.py", line 98, in __call__ result = self.orig_method(*args, **kwargs) File "/Users/shane/git/motor/test/tornado_tests/test_motor_core.py", line 166, in test_gridin_attrs attrs(MotorGridIn(self.cx.test.fs)) - motor_gridin_only) AssertionError: Items in the first set but not the second: 'writeable' 'readable' 'seekable' 'read' ====================================================================== FAIL: test_gridout_attrs (tornado_tests.test_motor_core.MotorCoreTestGridFS) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/shane/git/motor/venv3.7/lib/python3.7/site-packages/tornado/testing.py", line 98, in __call__ result = self.orig_method(*args, **kwargs) File "/Users/shane/git/motor/venv3.7/lib/python3.7/site-packages/tornado/testing.py", line 595, in post_coroutine functools.partial(coro, self, *args, **kwargs), timeout=timeout File "/Users/shane/git/motor/venv3.7/lib/python3.7/site-packages/tornado/ioloop.py", line 532, in run_sync return future_cell[0].result() File "/Users/shane/git/motor/venv3.7/lib/python3.7/site-packages/tornado/gen.py", line 742, in run yielded = self.gen.send(value) File "/Users/shane/git/motor/test/tornado_tests/test_motor_core.py", line 179, in test_gridout_attrs attrs(motor_gridout) - motor_gridout_only) AssertionError: Items in the first set but not the second: 'readable' 'write' 'seekable'
- is caused by
-
PYTHON-1695 GridOut does not implement seekable() from io.IOBase
- Closed
-
PYTHON-1783 User defined TypeCodecs should not be able to augment internal fields like cursor.id
- Closed
-
PYTHON-1663 Connection pool should be LIFO
- Closed