Skip to content

deal with upcoming deprecations in CPython #25912

@tacaswell

Description

@tacaswell
FAILED lib/matplotlib/tests/test_lines.py::test_set_line_coll_dash_image[svg] - matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 0.412):
FAILED lib/matplotlib/tests/test_backend_svg.py::test_url_tick - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.now(datetime.UTC).
FAILED lib/matplotlib/tests/test_backend_svg.py::test_svg_default_metadata - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.now(datetime.UTC).
FAILED lib/matplotlib/tests/test_backend_svg.py::test_svg_clear_default_metadata - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.now(datetime.UTC).

which was changed by python/cpython#103858

We appear to use this a couple of places in Matplotlib https://github.com/search?q=repo%3Amatplotlib%2Fmatplotlib%20utcfromtimestamp&type=code all of which need to be changed to not-deprecated methods of achieving the same thing.

I am labeling this as "good first issue" because there is no API design and there should be no behavior changes (other than not getting warnings) but "medium" difficulty as datetime and timezones are involved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGood first issueOpen a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy