Skip to content

Fix mpl.cbook.matplotlib depreciation warning#39

Open
thoellrich wants to merge 4 commits into
e-hulten:masterfrom
thoellrich:fix-mpl.cbook.MatplotlibDepreciationWarning
Open

Fix mpl.cbook.matplotlib depreciation warning#39
thoellrich wants to merge 4 commits into
e-hulten:masterfrom
thoellrich:fix-mpl.cbook.MatplotlibDepreciationWarning

Conversation

@thoellrich

@thoellrich thoellrich commented May 11, 2024

Copy link
Copy Markdown

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

kota113 commented Jun 7, 2024

Copy link
Copy Markdown

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
Copy Markdown

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

tur-ium commented Jul 10, 2024

Copy link
Copy Markdown

Checked and working great with the latest version of matplotlib!

@tur-ium tur-ium left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good!

@zhenyuan0502 zhenyuan0502 left a comment

Copy link
Copy Markdown

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

kota113 commented Jul 16, 2024

Copy link
Copy Markdown

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

@andrebadini

Copy link
Copy Markdown

One last aprove needed.

@etsaii etsaii left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

@packet-sent

Copy link
Copy Markdown

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/july.git@fix-mpl.cbook.MatplotlibDepreciationWarning

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

flokli commented Apr 28, 2025

Copy link
Copy Markdown

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.