MAINT testing.nose -> testing._nose to make it explicitely private#7947
Merged
anntzer merged 3 commits intomatplotlib:masterfrom Jan 27, 2017
NelleV:making_stuff_private
Merged
MAINT testing.nose -> testing._nose to make it explicitely private#7947anntzer merged 3 commits intomatplotlib:masterfrom NelleV:making_stuff_private
anntzer merged 3 commits intomatplotlib:masterfrom
NelleV:making_stuff_private
Conversation
QuLogic
approved these changes
Jan 26, 2017
anntzer
reviewed
Jan 26, 2017
| def __init__(self): | ||
| if not has_nose: | ||
| raise ImportError("Need nose for this plugin.") | ||
| pass |
Contributor
There was a problem hiding this comment.
remove the "pass"? (or at least indent it more)
anntzer
reviewed
Jan 26, 2017
lib/matplotlib/testing/__init__.py
Outdated
| from matplotlib.cbook import is_string_like, iterable | ||
| from matplotlib import rcParams, rcdefaults, use | ||
| # For backward compatibility | ||
| from . import noseclasses |
Contributor
There was a problem hiding this comment.
This line would always raise a deprecationwarning, I guess, and is not needed for backcompat anyways as noseclasses was not directly imported anyways?
Member
Author
There was a problem hiding this comment.
It is needed for backward compatibility unless it wasn't there before (I actually did not check this, so it might be worth doing).
As far as I know, there is no choice other than raising a deprecation at import time for whole module deprecation.
Contributor
There was a problem hiding this comment.
It wasn't there in 2.0:
$ python -c 'import matplotlib.testing as t; print(t.noseclasses)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: module 'matplotlib.testing' has no attribute 'noseclasses'
Member
Author
There was a problem hiding this comment.
woot \o/ thanks for checking.
Member
Author
|
@anntzer It is now fixed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request aims simply at making matplotlib.testing.nose an explicitely private module.
In practice, it is already almost invisible to the user, as not imported anywhere.