1

We're using a third party library which still uses the old @asyncio.coroutine decorator and is generating a bunch of warnings on import. I recognise this will break in future versions of python. But for now we just want to turn off this warning so that it doesn't spam the user.

I've tried everything I can think of to silence this including every answer here and even turning off all depreciation warnings:

warnings.filterwarnings("ignore", category=DeprecationWarning)

from pymodbus.client.asynchronous.async_io import (
    BaseModbusAsyncClientProtocol,
    ReconnectingAsyncioModbusTcpClient,
    ReconnectingAsyncioModbusTlsClient,
)

Nothing seems to silence it.

Philip Couling
  • 13,581
  • 5
  • 53
  • 85

0 Answers0