-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
Let's fix these warnings:
$ python3.8 -X dev setup.py test -s test.asyncio_tests.test_asyncio_cursor /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/depends.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp setup.py:28: ResourceWarning: unclosed file <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'> long_description = open("README.rst").read() ResourceWarning: Enable tracemalloc to get the object allocation traceback running test ... running build_ext /Users/shane/git/mongo-python-driver/pymongo/mongo_client.py:664: DeprecationWarning: Option 'ssl_ca_certs' is deprecated, use 'tlsCAFile' instead. keyword_opts = _handle_option_deprecations(keyword_opts) /Users/shane/git/mongo-python-driver/pymongo/mongo_client.py:664: DeprecationWarning: Option 'ssl_ca_certs' is deprecated, use 'tlsCAFile' instead. keyword_opts = _handle_option_deprecations(keyword_opts) test_aggregate_batch_size (test.asyncio_tests.test_asyncio_cursor.TestAsyncIOCursor) ... /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/events.py:81: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10. self._context.run(self._callback, *self._args) ok ... test_count (test.asyncio_tests.test_asyncio_cursor.TestAsyncIOCursor) ... /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/events.py:81: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10. self._context.run(self._callback, *self._args) ok ... test_exhaust (test.asyncio_tests.test_asyncio_cursor.TestAsyncIOCursor) ... /Users/shane/git/motor/test/asyncio_tests/test_asyncio_cursor.py:479: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10. await asyncio.sleep(0.1, loop=self.loop) ok
To quote docs for asyncio.sleep:
> Deprecated since version 3.8, will be removed in version 3.10: The loop parameter.
This was changed in https://bugs.python.org/issue36373.