sivulich / mqttasgi

MQTT ASGI Protocol Server
MIT License
34 stars 15 forks source link

Breaking change with paho-mqtt release 2.0 #27

Open isolationism opened 7 months ago

isolationism commented 7 months ago

Thank you for your work on this project. 🙇

Discovered this afternoon after paho-mqtt 2 was installed in a new container build.

The docs cite a new CallbackAPIVersion parameter, which corresponds with what I'm seeing in a stack trace:

   File "/usr/local/lib/python3.11/site-packages/mqttasgi/server.py", line 37, in __init__
    self.client = mqtt.Client(client_id=self.client_id, transport=self.transport, userdata={
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 TypeError: Client.__init__() missing 1 required positional argument: 'callback_api_version'
sivulich commented 6 months ago

Hi @isolationism, thanks for flagging this. I see two options here. We can consider fixing the paho version or supporting both. I'll let you know what we decide.