Skip to content

Don't warn on grid removal deprecation if grid is hidden#22285

Merged
jklymak merged 1 commit into
matplotlib:mainfrom
timhoffm:grid-removal-deprecation
Jan 25, 2022
Merged

Don't warn on grid removal deprecation if grid is hidden#22285
jklymak merged 1 commit into
matplotlib:mainfrom
timhoffm:grid-removal-deprecation

Conversation

@timhoffm

Copy link
Copy Markdown
Member

Fixes #21723.

See #21723 (comment)
for a full desrciption of motivation and edge cases.

@timhoffm timhoffm changed the title Don't warn on grid removal deprecation is grid is hidden Don't warn on grid removal deprecation if grid is hidden Jan 22, 2022
@timhoffm timhoffm added this to the v3.5.2 milestone Jan 22, 2022

@jklymak jklymak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It seems we need a test that this doesn't break in the future? Clearly we don't test with the grid turned on often enough. Otherwise the change seems fine to me.

Fixes matplotlib#21723.

See matplotlib#21723 (comment)
for a full desciption of motivation and edge cases.
@timhoffm timhoffm force-pushed the grid-removal-deprecation branch from 6408397 to 9e6d723 Compare January 22, 2022 13:30
@timhoffm

Copy link
Copy Markdown
Member Author

It seems we need a test that this doesn't break in the future?

I have refrained from adding a test because

  • the deprecation will expire for 3.7., which means we can remove that code after the 3.6 release. So it's only a couple of months. It's unlikely that we touch that code again.
  • The worst thing that can happen is a deprecation message issued less or more than optimal.

@jklymak

jklymak commented Jan 24, 2022

Copy link
Copy Markdown
Member

The suggestion here was more to make sure we had a couple tests with different styles turned on. The failure with the colorbar was pretty basic, and in a well-used style. However, I'm fine wth the idea that is beyond this PR's scope

QuLogic
QuLogic approved these changes Jan 25, 2022
@jklymak jklymak merged commit a6da11e into matplotlib:main Jan 25, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jan 25, 2022
dstansby added a commit that referenced this pull request Jan 25, 2022
…285-on-v3.5.x

Backport PR #22285 on branch v3.5.x (Don't warn on grid removal deprecation if grid is hidden)
@timhoffm timhoffm deleted the grid-removal-deprecation branch January 25, 2022 18:28
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.

[Bug]: Some styles trigger pcolormesh grid deprecation

3 participants