On Sat, 7 Jan 2023 03:34:19 -0500 Sandro Tosi <mo...@debian.org> wrote:
> python-dateutil expects to have 'dateutil-zoneinfo.tar.gz' in it's directory
> tree, but this file is removed in the packaging.
>
> Error:
> "/usr/lib/python3/dist-packages/dateutil/zoneinfo/__init__.py:26: UserWarning:
> I/O error(2): Datei oder Verzeichnis nicht gefunden
>   warnings.warn("I/O error({0}): {1}".format(e.errno, e.strerror))"
>
> Using: "matplotlib.dates import DateFormatter"

indeed this is breaking matplotlib, thus the grave severity. it needs
to be addressed for bookworm

How exactly does this break matplotlib?
dateutil.zoneinfo really shouldn't be used directly and I don't see any
reference to it in the matplotlib code.

dateutil.tz prefers the system timezone database so you should see this
warning only when trying to use a non-existent timezone.
Even then it is just a warning, not an exception that is thrown.

>>> import dateutil.tz
>>> dateutil.tz.gettz('UTC')
tzfile('/usr/share/zoneinfo/UTC')
>>> dateutil.tz.gettz('foo')
/usr/lib/python3/dist-packages/dateutil/zoneinfo/__init__.py:26: UserWarning: I/O error(2): No such file or directory
  warnings.warn("I/O error({0}): {1}".format(e.errno, e.strerror))


I guess we have two options if we want to change the current behavior:
1) Ship the outdated tzdata tarball even though nothing should really use it.
2) Add a patch to remove the dateutil.zoneinfo fallback.

Reply via email to