You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: DepecrationWarning for datetime.datetime.utcfromtimestamp with Python >= 3.12 #27600
Not really a bug, but I noticed that Python 3.12 introduced a new deprecation warning in the datetime module that affects Matplotlib users and dependent packages.
I could not find any related issue, so I wanted to point it out to you.
I actually run my tests with pytest -Werror so I had to filter out the warning with: ignore:datetime\.datetime\.utcfromtimestamp\(\) is deprecated:DeprecationWarning to pass tests on Python 3.12 :-)
From a quick search, there is no direct usage of utcfromtimestamp in Matplotlib’s current codebase. All I found was a pointer that these were removed at #25918, which was before v3.8 was released.
Could you provide a code snippet that reproduces the warning @jeertmans?
Yes sorry @rcomer, so I created a dummy PR on my repo to show failures in CI (I don't have Python 3.12 locally installed).
Actually, the warning seems to be caused by a third-party module (dateutil), and it looks like they have already an issue open for that: dateutil/dateutil#1314.
Activity
rcomer commentedon Jan 4, 2024
From a quick search, there is no direct usage of
utcfromtimestampin Matplotlib’s current codebase. All I found was a pointer that these were removed at #25918, which was before v3.8 was released.Could you provide a code snippet that reproduces the warning @jeertmans?
jeertmans commentedon Jan 4, 2024
Yes sorry @rcomer, so I created a dummy PR on my repo to show failures in CI (I don't have Python 3.12 locally installed).
Actually, the warning seems to be caused by a third-party module (
dateutil), and it looks like they have already an issue open for that: dateutil/dateutil#1314.Should I close this one?
Sorry for not checking that before.
rcomer commentedon Jan 4, 2024
Thanks for checking! Yes, it looks like there is nothing we can do for this in Matplotlib, so this issue should be closed.