Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Restore (and warn on) seaborn styles in style.library#24265
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -184,6 +184,8 @@ def test_deprecated_seaborn_styles(): | |||
with pytest.warns(mpl._api.MatplotlibDeprecationWarning): | |||
mpl.style.use("seaborn-bright") | |||
assert mpl.rcParams == seaborn_bright | |||
with pytest.warns(mpl._api.MatplotlibDeprecationWarning): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can you explain this? You just tested this three lines above - do we understand why that test passed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
That'sstyle.use
, this isstyle.library
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Ah...
OTOH, do we expect users to accessstyle.library
? Should this be private, or is it useful to expose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't know if we expect them to or not, but we already have the bug report from a user, so itis being used. It is also documented, at least a little, in the module docstring. In any case, this is only the bug fix for now.
available = [] | ||
def reload_library(): | ||
"""Reload the style library.""" | ||
global library | ||
library = update_user_library(_base_library) | ||
library.update(update_user_library(_base_library)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
To match previous semantics, library should be cleared first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Good catch.
…265-on-v3.6.xBackport PR#24265 on branch v3.6.x (Restore (and warn on) seaborn styles in style.library)
PR Summary
Fixes#24264
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).