-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Removal of verbose not documented: AttributeError: module 'matplotlib' has no attribute 'verbose' #10716
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
Comments
This was just a straight-ahead error on my part.
Sorry about the inconvenience. The API was not meant to change. |
This seems to have other consequences as well, namly PyCharm not producing plots in its toolwindow. See https://stackoverflow.com/questions/49146678/module-matplotlib-has-no-attribute-verbose |
A new stable version of matplotlib must be released as soon as feasible. Ideally, tonight or tomorrow. Why? Because the entire matplotlib ecosystem has been brought to its knees by this apocalyptic mistake. As @ImportanceOfBeingErnest notes, the breakage extends to PyCharm itself. Our own multiphysics biology simulator is now incompatible with the most recent stable version of matplotlib. Functional and unit tests are failing everywhere. Dumpsters are belching fire. The streets are littered with bugs. An ominous red glow emanates from the ashen sky. In the deafening stillness, you can hear a codebase cry. I believe my delicate hair may even have been singed. This is calamitous, frankly. For stability, downstream applications requiring matplotlib as a third-party dependency now need to either:
Emergency blood ministration may now be in order. |
Again, so very sorry this caused a major issue for folks. Obviously Matplotlib does not want to break things. If a downstream package depends on Matplotlib, the maintainers are strongly encouraged to test out the release candidates . That way we can catch unanticipated bugs before the new release. Yes our testing should catch everything, but downstream packages use the API in ways the developers don't always anticipate. Release candidates are announced via mailing lists |
Thanks for being so forthright about this whole mishap. You're awesome, @jklymak.
Absolutely. That said, to prevent this from inevitably regressing, it'd be useful if a unit test exercising the existence of the
That's fair enough, but... reality intrudes. When project deadlines conflict with best practices, project deadlines always win. Our project alone has five large-scale mandatory dependencies (including matplotlib, NumPy, SciPy, and Pillow) and a bevy of large-scale optional dependencies (including NetworkX, PyDot, and Consider PyCharm, then. How many mandatory and optional Python dependencies must that million-line codebase have? Effectively all of them. Expecting project maintainers to actively test release candidates for all dependencies seems... egregious. With all due respect, that responsibility principally lies with the matplotlib development team. This is what continuous integration is for. Happily, you already do continuous integration. Assuming a test exercising this issue is added to your test suite and a new point release (e.g., matplotlib 2.2.1) is promptly issued, that's the best anyone can or should expect. Thanks again, @jklymak and crew. We couldn't model head-regenerating flatworm planaria without you! |
Well, just for some history. Before 2.2, we didn't need a unit test for There is already a PR in to re-instate verbose for now. I wouldn't hold my breath for a release this w/e, but it'll happen soon (beyond my pay grade, but the higher ups are keenly aware of the problem). Completely understand about everyone's time, and the difficulties of maintaining package compatibility. No doubt downloading every RC for every dependency is a PITA. We'll work through this as quickly as we can. Thanks for your patience. |
Gotcha. If that's the case, we won't even bother monkey-patching
Thanks for the heads up!
Cheers. While I'm a Vim afficianado myself, PyCharm + matplotlib 2.2.0 is currently broken, which is a big deal. With any luck, both teams will roll out solutions as speedily as feasible. In the meanwhile, there be scorpions here. 🦂 🦂 🦂 |
Out of curiousity what do you need verbose for? |
That's a good question, actually. The answer, of course, is many, many things. Because matplotlib is so central to our simulator, we manipulate matplotlib at a dangerously lower level than one might expect or desire. I hope to eventually contribute most of this functionality back to matplotlib itself, but... time constraints. In particular, our simulator:
Needless to say, logging concerns frequently raised their ugly heads while implementing this deep voodoo. Ergo, This functionality is all several years old now. It's probably long since been superseded by recent matplotlib improvements, but... it works, so that's nice. |
Now that I've penned the above, I have growing concerns. In theory, matplotlib's shift to the canonical Since matplotlib logging is typically much too verbose for our purpose, we'd like to squelch this verbosity. How exactly would we go about that? I note this germane discussion from several months ago, which suggests that:
Again, allow me to mention that you're awesome. |
Basically, there are some log calls at DEBUG level that are triggered just by importing matplotlib(.pyplot). (I have put in a few PRs that try to make sure that the act of importing matplotlib(.pyplot) never logs anything at a level higher than DEBUG, but no guarantees there.) Given that in the absence of config, the default loglevel is WARNING, that means that if you are interested in matplotlib's import-time DEBUG logs, you need to configure the loglevel before importing matplotlib. If you don't care about these, then the time where you configure logging doesn't matter. In other words: logging configuration needs to respect time causality. |
Excellent. As you suggest, the default log level of Thanks, @anntzer and @jklymak. We now return to your regularly scheduled development efforts. |
@leycec Just as another point - it may be possible to test pre releases as part of your CI process, so you may not have to do it by hand. I'm no expert on CI, but I understand our nightly build does this with both python and numpy (i.e. it doesn't run for each PR). If more downstream developers added this, I think it'd be a huge help to us. |
For PyCharm, it seems jet brains have a fix in: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000097690-AttributeError-module-matplotlib-has-no-attribute-verbose-?page=1#community_comment_360000089990 |
Bug report
Bug summary
In v2.2.0, the
verbose
class was removed (and replaced withlogging
) - see #9302. The API changes document has no mention of this change.This was definitely part of the external API - the default matplotlibrc file contained the note:
The text was updated successfully, but these errors were encountered: