Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MAINT testing.nose -> testing._nose to make it explicitely private #7947

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

Merged
merged 3 commits into from
Jan 27, 2017
Merged

MAINT testing.nose -> testing._nose to make it explicitely private #7947

merged 3 commits into from
Jan 27, 2017

Conversation

NelleV
Copy link
Member

@NelleV NelleV commented Jan 25, 2017

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.

@NelleV NelleV changed the title MAINT testing.nose -> testing._nose to make it explicitely private [WIP] MAINT testing.nose -> testing._nose to make it explicitely private Jan 25, 2017
@NelleV NelleV changed the title [WIP] MAINT testing.nose -> testing._nose to make it explicitely private [MRG+1] MAINT testing.nose -> testing._nose to make it explicitely private Jan 26, 2017
@NelleV NelleV changed the title [MRG+1] MAINT testing.nose -> testing._nose to make it explicitely private [MRG] MAINT testing.nose -> testing._nose to make it explicitely private Jan 26, 2017
@QuLogic QuLogic changed the title [MRG] MAINT testing.nose -> testing._nose to make it explicitely private [MRG+1] MAINT testing.nose -> testing._nose to make it explicitely private Jan 26, 2017
@QuLogic QuLogic added this to the 2.1 (next point release) milestone Jan 26, 2017
def __init__(self):
if not has_nose:
raise ImportError("Need nose for this plugin.")
pass
Copy link
Contributor

Choose a reason for hiding this comment

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

remove the "pass"? (or at least indent it more)

Copy link
Contributor

Choose a reason for hiding this comment

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

@NelleV I will merge the PR if you fix this :)

@@ -8,6 +8,8 @@
import matplotlib
from matplotlib.cbook import is_string_like, iterable
from matplotlib import rcParams, rcdefaults, use
# For backward compatibility
from . import noseclasses
Copy link
Contributor

Choose a reason for hiding this comment

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

This line would always raise a deprecationwarning, I guess, and is not needed for backcompat anyways as noseclasses was not directly imported anyways?

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

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'

Copy link
Member Author

Choose a reason for hiding this comment

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

woot \o/ thanks for checking.

@NelleV NelleV closed this Jan 27, 2017
@NelleV NelleV reopened this Jan 27, 2017
@NelleV
Copy link
Member Author

NelleV commented Jan 27, 2017

@anntzer It is now fixed.

@anntzer anntzer merged commit 0dfd271 into matplotlib:master Jan 27, 2017
@QuLogic QuLogic changed the title [MRG+1] MAINT testing.nose -> testing._nose to make it explicitely private MAINT testing.nose -> testing._nose to make it explicitely private Jan 27, 2017
@NelleV NelleV deleted the making_stuff_private branch January 28, 2017 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants