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

Skip to content

Deprecate unused testing cleanup mechanisms #17042

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

Closed
wants to merge 4 commits into from

Conversation

SidharthBansal
Copy link
Contributor

PR Summary

The class matplotlib.testing.decorators.CleanupTestCase and the decorator matplotlib.testing.decorators.cleanup are not used in the code base. We have an automatic cleanup via an auto-used fixture instead. This PR removes them.
Fixes #14329

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@SidharthBansal SidharthBansal changed the title Cleanups to contour docs. Deprecate unused testing cleanup mechanisms Apr 6, 2020
@SidharthBansal
Copy link
Contributor Author

SidharthBansal commented Apr 6, 2020

@jklymak @story645 kindly review and please tell me things which I am missing here.

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

Please use the deprecation decorators.

@@ -35,58 +35,6 @@ def _cleanup_cm():
plt.close("all")


class CleanupTestCase(unittest.TestCase):
Copy link
Member

Choose a reason for hiding this comment

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

This isn't a deprecation, you have just removed these.

What is the motivation for deprecating these? Just general cleanup?

@jklymak
Copy link
Member

jklymak commented Apr 7, 2020

I take #14329 (comment) to mean that @anntzer would explicitly like to keep these methods.

@SidharthBansal
Copy link
Contributor Author

SidharthBansal commented Apr 7, 2020 via email

@anntzer
Copy link
Contributor

anntzer commented Apr 7, 2020

I think these can/should stay for now.

@SidharthBansal Matplotlib is a very widely used library, and effectively anything that we expose is likely used by tons of people regardless of whether we intended it for external use or not. Thereforce we try not to remove stuff unless there's a clear reason to ("clear" being something that you can only evaluate with some experience...) and even then, we need a deprecation period where the thing stays but third-party users who rely on it get a warning that the API is going away.

In this specific case, I think this API has a legitimate use case and is self-contained enough that it does not cause undue maintenance burden by staying. Obviously @timhoffm had a different opinion in #17042 and may therefore want to chime in.

@SidharthBansal
Copy link
Contributor Author

SidharthBansal commented Apr 7, 2020 via email

@anntzer
Copy link
Contributor

anntzer commented Apr 7, 2020

My opinion is to close as wontfix, but again let's give @timhoffm time to give his opinion as well. Or sometimes issues just need more discussion :)

@jklymak
Copy link
Member

jklymak commented Apr 7, 2020

I think we can proactively close this. If @timhoffm wants more discussion, he can re-open.

@SidharthBansal
Copy link
Contributor Author

SidharthBansal commented Apr 7, 2020 via email

@timhoffm
Copy link
Member

timhoffm commented Apr 7, 2020

@anntzer I'm fine with keeping if you think it's worth it.

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.

Deprecate unused testing cleanup mechanisms
4 participants