paho.mqtt.python
paho.mqtt.python copied to clipboard
Fix Python >=3.10 PROTOCOL_TLS DeprecationWarning
PROTOCOL_TLS_CLIENT/_SERVER are attempted to be selected before falling back to the legacy PROTOCOL_TLS setting. The side effects of using PROTOCOL_TLS_CLIENT is that CERT_REQUIRED and check_hostname are enabled by default, but these were explicitly used as a default already and remain to be the defaults even if PROTOCOL_TLS_CLIENT is unavailable.
The settings in examples\client_pub_opts.py and examples\client_sub_opts.py are unaffected.
Bug: https://github.com/eclipse/paho.mqtt.python/issues/653
The warning is now gone:
