eclipse / paho.mqtt.python

paho.mqtt.python
Other
2.19k stars 721 forks source link

Fix Python >=3.10 PROTOCOL_TLS DeprecationWarning #665

Closed maranov closed 10 months ago

maranov commented 2 years ago

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: image

sytherisop commented 1 year ago

dude i am facing this error u know how to fix this

zhanglongqi commented 1 year ago

May I know why this is not merged since it has been existed for several months.

henloef commented 1 year ago

May I know why this is not merged since it has been existed for several months.

It is not fixed because no-one is actively maintaining this package, according to the mailing list https://www.eclipse.org/lists/paho-dev/msg04742.html

Furthermore, pypi lists python 3.10 as supported, while it is not actually tested according to the tox specification /workflows/tox.yml, which might be the reason why this bug is allowed to exists

PierreF commented 10 months ago

Thanks for this contribution. To my understanding it has one minor change: hostname will be checked when the previously wasn't. This seems a good change, the next release will be with breaking change so I'll update the Changelog to include this "breaking change".

For the ECA check, I believe the automated check is wrong, it probably get confused because the Author & Committer email aren't the same. Anyway you author & signed-off email had a valid ECA signature which is fine for me.