Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking change in paho-mqtt 2.0 #759

Open
gernot-h opened this issue Feb 14, 2024 · 1 comment
Open

breaking change in paho-mqtt 2.0 #759

gernot-h opened this issue Feb 14, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@gernot-h
Copy link
Contributor

gernot-h commented Feb 14, 2024

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
Copy link
Contributor Author

gernot-h commented Mar 9, 2024

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

@flobz flobz added the enhancement New feature or request label Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants