psa_car_controller icon indicating copy to clipboard operation
psa_car_controller copied to clipboard

breaking change in paho-mqtt 2.0

Open gernot-h opened this issue 1 year ago • 1 comments

Tried a fresh install today and ended up with:

Traceback (most recent call last):
  File "/root/psa_car_controller/venv/lib/python3.11/site-packages/psa_car_controller/psa/RemoteClient.py", line 105, in start
    self.mqtt_client = mqtt.Client(clean_session=True, protocol=mqtt.MQTTv311)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Client.__init__() missing 1 required positional argument: 'callback_api_version'

paho-mqtt 2.0, released on Feb, 10th, now requires an additional argument to mqtt.Client(), see their migration notes.

So we need to either change RemoteClient.py or restrict paho-mqtt versions in pyproject.toml:

paho-mqtt = ">=1.5.0, <2.0.0"

If you let me know which solution you prefer, I can happily prepare a PR. :-)

gernot-h avatar Feb 14 '24 21:02 gernot-h

My workaround is in master now, but we might still consider doing the real fix so we could update to paho-mqtt 2.0.

gernot-h avatar Mar 09 '24 08:03 gernot-h