Open parrotrueper opened 5 days ago
Hi. It looks like compatibility with paho-mqtt version 2 has been addressed already.
However, support for version 2 might be incomplete, or not thorough, yet.
However, support for version 2 might be incomplete, or not thorough, yet.
/usr/local/lib/python3.11/site-packages/pytest_mqtt/capmqtt.py:38: DeprecationWarning: Callback API version 1 is deprecated, update to latest version
self.client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION1)
I see. Line 38 instructs the library to use mqtt.CallbackAPIVersion.VERSION1
.
Sorry if this is a silly question, but how do I tell
capmqtt
to use the paho-mqtt Version 2 for the tests?
So, I guess you are already using paho-mqtt version 2, but still the "Callback API version 1". I think you can do nothing about the situation, other than silencing the warning messages. This, on the other hand, may also be conducted on behalf of pytest-mqtt already.
In the mid-term, pytest-mqtt must update how it uses the callback api of paho-mqtt, in order to adhere to the convention/specification of the "Callback API version 2".
Hi again. bea0d52be78f makes the procedure ignore the deprecation warning, until the transition to Callback API v2 has been concluded. Do you think this will help you already?
pytest-mqtt 0.4.3 has just been released and published to PyPI.
Given the following test
running with:
The test passes but I get the following warning:
Sorry if this is a silly question, but how do I tell
capmqtt
to use the paho-mqtt Version 2 for the tests?