kaizendorks / pymongo_inmemory

A mongo mocking library with an ephemeral MongoDB running in memory.
MIT License
40 stars 13 forks source link

DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead #46

Closed ItsKarma closed 2 years ago

ItsKarma commented 2 years ago

Describe the bug I am using pymongo_inmemory with pytest. At the end of my pytest run I am getting the following message:

============================================================================================ warnings summary ============================================================================================
../usr/local/lib/python3.10/site-packages/pymongo_inmemory/downloader/__init__.py:191
../usr/local/lib/python3.10/site-packages/pymongo_inmemory/downloader/__init__.py:191
  /usr/local/lib/python3.10/site-packages/pymongo_inmemory/downloader/__init__.py:191: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
    logger.warn((

-- Docs: https://docs.pytest.org/en/stable/warnings.html

This is not causing any problems, but something that should probably be addressed.

To Reproduce Steps to reproduce the behavior:

  1. from pymongo_inmemory import MongoClient
  2. run pytest

Expected behavior pytest should complete without warning of this message.

Logs See the message in the summary.

Screenshots See Logs

Context: