Skip to content

Fix mpl.cbook.matplotlib depreciation warning #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

thoellrich
Copy link

@thoellrich thoellrich commented May 11, 2024

Fix the mpl.cbook.MatplotlibDeprecationWarning symbol to mpl.MatplotlibDeprecationWarning. Without this, july won't show any charts for newer versions of matplotlib.
Also bump version number.

This symbol has moved from mpl.cbook.MatplotlibDepreciationWarning to mpl.MatplotlibDepreciationWarning
@kota113
Copy link

kota113 commented Jun 7, 2024

Thank you for your fix.
@e-hulten Could you take a look at this PR?
This fix is necessary to keep this library functional.

@taesungh
Copy link

Can confirm as described in the matplotlib API changes for 3.8.0: cbook removals.
Would appreciate if this fix could be merged @e-hulten, thanks.

@tur-ium
Copy link

tur-ium commented Jul 10, 2024

Checked and working great with the latest version of matplotlib!

Copy link

@tur-ium tur-ium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link

@zhenyuan0502 zhenyuan0502 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix is necessary otherwise no newer matplotlib version supported

@kota113
Copy link

kota113 commented Jul 16, 2024

We also need to specify the versions of dependencies to ensure this lib to work.

@andrebadini
Copy link

One last aprove needed.

Copy link

@etsaii etsaii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@packet-sent
Copy link

If anybody wants to make use of the fix until its pushed then you can always do the following:
pip install -U git+https://github.com/thoellrich/[email protected]

flokli added a commit to flokli/july that referenced this pull request Apr 28, 2025
This code was responsible from hiding deprecation warnings if a key gets
unused, but it causes more harm than good:

mpl did refactor their deprecation system, and the code simply failed as
the old mpl.cbook.MatplotlibDeprecationWarning didn't exist anymore.

Instead of going the approach of e-hulten#39 or e-hulten#43 again and adjusting to the
change, simply drop the deprecation warning hiding alltogether.

It'll show when july starts using deprecated keys, so they can be
updated.

Also use `mpl.rcParams[key] = value` directly and drop the ConfigDict
logic, as it's unneeded.

Closes e-hulten#39.
Closes e-hulten#43.
@flokli
Copy link

flokli commented Apr 28, 2025

Alternative approach: #44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants