rethinkdb-python icon indicating copy to clipboard operation
rethinkdb-python copied to clipboard

DeprecationWarning with pytest

Open metal3d opened this issue 4 years ago • 0 comments

Describe the bug Running tests for one project, I see:

../../.local/share/virtualenvs/rethinkmodel-WGhjQTXi/lib/python3.9/site-packages/rethinkdb/ast.py:87
  /home/metal3d/.local/share/virtualenvs/rethinkmodel-WGhjQTXi/lib/python3.9/site-packages/rethinkdb/ast.py:87: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
    elif isinstance(val, collections.Callable):

../../.local/share/virtualenvs/rethinkmodel-WGhjQTXi/lib/python3.9/site-packages/rethinkdb/ast.py:108
  /home/metal3d/.local/share/virtualenvs/rethinkmodel-WGhjQTXi/lib/python3.9/site-packages/rethinkdb/ast.py:108: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
    elif isinstance(val, collections.Mapping):

rethinkmodel/tests/test_generic.py::GenericTest::test_create
  /home/metal3d/.local/share/virtualenvs/rethinkmodel-WGhjQTXi/lib/python3.9/site-packages/rethinkdb/ast.py:115: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
    elif isinstance(val, collections.Iterable):

Note the message: with Python 3.10, the module will stop working. I made a Pull Request to fix, see #253

To Reproduce Steps to reproduce the behavior:

  1. Launch pytest on any project using rethinkdb

Expected behavior No warning...

System info

  • OS: Linux Fedora 33

metal3d avatar Mar 01 '21 22:03 metal3d