-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
Bump paho-mqtt client to version 2.1.0 #136130
base: dev
Are you sure you want to change the base?
Conversation
Hey there @emontnemery, @bdraco, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
self._in_callback_mutex = NullLock() # type: ignore[assignment] | ||
self._callback_mutex = NullLock() # type: ignore[assignment] | ||
self._msgtime_mutex = NullLock() # type: ignore[assignment] | ||
self._out_message_mutex = NullLock() # type: ignore[assignment] | ||
self._in_message_mutex = NullLock() # type: ignore[assignment] | ||
self._reconnect_delay_mutex = NullLock() # type: ignore[assignment] | ||
self._mid_generate_mutex = NullLock() # type: ignore[assignment] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed since the new version has type hints now
@@ -117,7 +116,7 @@ | |||
|
|||
MAX_PACKETS_TO_READ = 500 | |||
|
|||
type SocketType = socket.socket | ssl.SSLSocket | mqtt.WebsocketWrapper | Any | |||
type SocketType = socket.socket | ssl.SSLSocket | mqtt._WebsocketWrapper | Any # noqa: SLF001 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems needed still, but the WebsocketWrapper
class was made private (renamed)
client_id, | ||
protocol=proto, | ||
transport=transport, | ||
transport=transport, # type: ignore[arg-type] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New typing requires a literal string
@@ -533,7 +533,7 @@ def _increase_socket_buffer_size(self, sock: SocketType) -> None: | |||
try: | |||
# Some operating systems do not allow us to set the preferred | |||
# buffer size. In that case we try some other size options. | |||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, new_buffer_size) | |||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, new_buffer_size) # type: ignore[union-attr] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems still to be working when executed in the debugger. Not sure about the type warnings.
async def _async_wait_for_mid_or_raise( | ||
self, mid: int | None, result_code: int | ||
) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case of an error mid
will be None
matcher = MQTTMatcher() | ||
matcher = MQTTMatcher() # type: ignore[no-untyped-call] | ||
matcher[subscription] = True | ||
|
||
return lambda topic: next(matcher.iter_match(topic), False) | ||
return lambda topic: next(matcher.iter_match(topic), False) # type: ignore[no-untyped-call] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part of the library seems not to be typed yet
roombapy==1.8.1 | ||
#roombapy==1.8.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Temporary removed this to allow testing the mqtt
integration
@@ -41,7 +41,6 @@ types-beautifulsoup4==4.12.0.20241020 | |||
types-caldav==1.3.0.20241107 | |||
types-chardet==0.1.5 | |||
types-decorator==5.1.8.20240310 | |||
types-paho-mqtt==1.6.0.20240321 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the type stub for the old version. Note that the package explicitly needs to be uninstalled. Just updating the test dependencies is not enough.
@allenporter and I were just talking about this last week. We should be able to get this done |
I have created a PR for roombapy, to hopefully get that updated. |
Thanks, the PR looks good |
Please leave a comment about the version when the library is bumped |
…ments are updated
roborock bump with paho-mqtt 2.1.0 compatibility is in #136727 |
Proposed change
Bump
paho-mqtt
client to version 2.1.0Bump
pyeconet==0.1.23
->0.1.26
Dependencies
The following libraries are incompatible and need to be updated to allow the upgrade:
python-roborock==2.8.4
-> 2.9.5. The HA dep still needs to be updated though.roombapy==1.8.1
(PR was opened: Update to paho-mqtt 2.1.0 pschmitt/roombapy#405)The type stub
types-paho-mqtt
was removed from the dependencies.The libraries are temporary removed from this PR to allow paho-mqtt to upgrade.
The following libraries have a dependency and may need attention as they have a dependency:
TODO Checks on depending libraries:
ibmiotf==0.3.4
used for watson_iot, no active users reported. Version 0.4.0 was released Aug 9, 2018. Library does not seem to be maintained anymore. It looks the library only references thepaho.mqtt.client.MQTT_ERR_SUCCESS
constant and does not call the paho client it self. So no changes needed.microBeesPy==0.3.5
used for microbees, 2 active users reported. It seems MQTT is not used in HA, so it might not have impact. The config initializes without issues when the new paho client is loaded.pyeconet==0.1.23
->0.1.26
(bump included in this PR)pyezviz==0.2.1.2
The backend lib needs a bump: Bump paho-mqtt from 1.6.1 to 2.1.0 RenierM26/pyEzvizApi#16. It is not likely the HA integartion will fail without the bump as no MQTT is used.pysmappee==0.2.29
tuya-device-sharing-sdk==0.2.1
The Tuya integration will not break and work without any changes (tested in a dev). The MQTT features from the SDK are not used.Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: