| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
The failing tests are an indication that these were not properly deprecated earlier (and that I didn't look carefully enough across the entire code base...). Should they still be removed or should they be properly deprecated now instead? |
Sorry, something went wrong.
|
I don't think we have or easily could have added a warning on importing the class via cbook.MatplotlibDeprecationWarning atbruntime. But we have properly documented the deprecation: https://matplotlib.org/devdocs/api/prev_api_changes/api_changes_3.4.0.html#deprecation-related-functionality-is-considered-internal Also it's rather unlikely for end users to import MatplotlibDeprecationWarning. So let's continue with the removal as planned. The internal import errors are an oversight and should be fixed. |
Sorry, something went wrong.
|
I've fixed the failing tests and added release note. (Azure is not that happy, but I doubt it is my fault.) |
Sorry, something went wrong.
|
This removal hard breaks a seaborn function.
Curious what the basis for this claim was? https://github.com/search?q=%22from+matplotlib.cbook+import+MatplotlibDeprecationWarning%22&type=Code shows 2k+ direct imports of this class, and searching for alternate usage patterns turns up others as well.
I agree that this would have been hard! But IMO that puts the burden on matplotlib to deprecate with a bit more care (e.g., proactively searching for usage in downstream libraries, etc.). You are right that this was "properly documented", but it is mentioned in the middle of a very long list of API changes (there are >4000 words on https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.4.0.html). Downstream libraries have the reasonable expectation that they can rely on unit test coverage to surface deprecation warnings, since matplotlib is usually good about that sort of thing. In the future, please boost the signal of any silent deprecations. |
Sorry, something went wrong.
|
We should back out the change that broke seaborn and sort out a way to loudly complain. This is a blocking issue for mpl36. |
Sorry, something went wrong.
|
Assuming that it is primarily the import of MatlabDeprecationWarning from cbook that is required (and that importing cbook.deprecation is not required), it should at least be pretty straightforward to get it up and running again. Making it scream loud is another problem (which I believe more classes suffer from). |
Sorry, something went wrong.
This was not possible in 3.4 as it supported Python 3.6; it is possible now with __getattr__, for which we already have a helper. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
Expire deprecations in cbook.deprecation. Will add a release note, but was a bit confused which things actually are deprecated.
cbook.MatplotlibDeprecationWarning and cbook.mplDeprecation are deprecated based on the earlier release note:
However, it is possible to import cbook.MatplotlibDeprecationWarning and cbook.mplDeprecation and use them without any deprecation warnings. Is it still OK to removed them?
Btw, the current code gave a dual deprecation warning: :-)
PR Checklist
Tests and Styling
Documentation