My plan is to try the 2.0 signature. I think it will throw a TypeError (but 
what ever it throws) and catch that and use the 1.6 signature.
Unless a Python expert has a better idea.
The alternative is use an if to check the version and call the appropriate 
signature.
Make sure to a read the upgrade notes. You will want to pass in the value 
to say to use the old signatures for other methods. Looks like a bunch 
changed.
I hope to start working on it soon. The biggest pain will be updating my 
CI/CD to (1) deal with multiple versions and (2) decide how much to test 
against each version… 
rich

On Sunday 11 February 2024 at 14:12:32 UTC-5 Greg Troxel wrote:

> "bell...@gmail.com" <bell...@gmail.com> writes:
>
> > It currently will not work with paho mqtt 2.0.0 or higher.
>
> Sorry, I understood that. I have looked briefly at the migration which
> says "change your code because a function signature changed", and have I
> have been holding off because I'll need to fully absorb it, and then
> update rtl_433_mqtt_relay.pt (for which I am somewhat the maintainer)
> and a program (that I haven't published yet) that polls ups-nut and
> reports status over mqtt.
>
> What I meant, is, do you expect that when you figure out how to deal
> with the incompatible changes, you'll end up with a MQTTSubscribe that
> can function with either, or if we'll need to match versions.
>
> If there's a way to do it (try/catch and figure out the signature?) then
> presumaly the MQTT publish extension, rtl_433_mqtt_relay and everything
> else can use that technique.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/6cfef91c-5d81-42ec-be12-ce14a25be384n%40googlegroups.com.

Reply via email to