django-apscheduler icon indicating copy to clipboard operation
django-apscheduler copied to clipboard

PytzUsageWarning on Startup

Open CharlesFr opened this issue 2 years ago • 3 comments

Every time the scheduler starts I get the following warning:

/app/.heroku/python/lib/python3.8/site-packages/apscheduler/triggers/cron/__init__.py:146: PytzUsageWarning: The normalize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html

Is this due to bad setup on my behalf or is there a bug?

CharlesFr avatar Mar 02 '22 10:03 CharlesFr

This is probably related to #161: we need to remove the dependency on pytz eventually though I am not sure if there is a hard deadline by which that should be done.

jcass77 avatar Mar 02 '22 12:03 jcass77

Thanks @jcass77 - is there anything I can do in the meantime to supress this error?

CharlesFr avatar Mar 07 '22 09:03 CharlesFr

It's a warning, not an error, so you can just ignore it.

If staring at the warning really bothers you then you can enable a warning filter to suppress it completely.

But this has the drawback of also hiding other deprecation warnings that you might care more about and is probably not advisable.

jcass77 avatar Jul 22 '22 13:07 jcass77