On 14/02/2026 15:46, Patrick Wigmore wrote:
The apscheduler package is using the tzlocal package as one of its
dependencies.
This warning message arises when apscheduler's IntervalTrigger class
calls the normalize method of a tzlocal timezone object, which you can
see in the apscheduler v3.8.1 source code here:
https://github.com/agronholm/apscheduler/blob/fc5c361dd9978c593b82125028119a358790048d/apscheduler/triggers/interval.py#L66
So, the warning in this case is directed at the developer of
apscheduler. It doesn't relate to the code you have written.
Modifying your code probably won't stop the warning appearing.
It's not saying anything is going wrong. It's just rather forcefully
saying there's now a new way to achieve the same outcome. I suppose
the implication is that, if the new way of doing it doesn't get
adopted, then eventually the old way of doing it might stop working,
but that would be in some future release, not this one.
It's been discussed on the apscheduler issue tracker:
https://github.com/agronholm/apscheduler/discussions/570
According to the discussion, the warnings can be safely ignored, or
tzlocal can be downgraded to a 2.x version to make them go away.
Apparently apscheduler 4.x (which appears to be in alpha; not
released yet) fixes this properly. Looking at the source code and the
discussions, a quick fix to stop the warnings appearing has been
implemented as of apscheduler v3.9.0, but the continued discussion
indicates that this did not catch all possible triggers for the
warning and they're not going to completely fix it in 3.x.
So, it sounds like upgrading apscheduler is, in fact, a solution.
It's just that the version you need to upgrade it to hasn't been
released yet!
Patrick,
Many thanks for that :-)
I still don't understand how the offset is meant to be defined, but I
won't die in a ditch over it.
--
Terry Coles
--
Next meeting: Online, Jitsi, Tuesday, 2026-03-03 20:00
Check to whom you are replying
Meetings, mailing list, IRC, ... https://dorset.lug.org.uk
New thread, don't hijack: mailto:[email protected]