Skip to content

Commit

Permalink
Handle paho-mqtt v1/v2 compat.
Browse files Browse the repository at this point in the history
Relaxes the signatures of methods on `MQTTEventBroker` that are registered as callbacks on the mqtt client so that they will work as either v1 or v2 client style callbacks.

Adds a tox env to explicitly test against paho-mqtt v1 (`$ tox -e paho-mqtt-v1`).
  • Loading branch information
peterschutt committed Mar 1, 2024
1 parent 5dab277 commit a3dfa99
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ test = [
"anyio[trio]",
"asyncmy >= 0.2.5; python_implementation == 'CPython'",
"coverage >= 7",
"paho-mqtt >= 2.0",
"paho-mqtt >= 1.5",
"psycopg",
"pymongo >= 4",
"pymysql[rsa]",
"PySide6 >= 6.6; python_implementation == 'CPython'",
"pytest >= 8.0",
"pytest >= 7.4",
"pytest-lazy-fixtures",
"pytest-mock",
"time-machine >= 2.13.0; python_implementation == 'CPython'",
Expand Down Expand Up @@ -132,4 +132,7 @@ commands = pyright --verifytypes apscheduler
[testenv:docs]
extras = doc
commands = sphinx-build -n docs build/sphinx
[testenv:paho-mqtt-v1]
deps = paho-mqtt~=1.5
"""

0 comments on commit a3dfa99

Please sign in to comment.