Don't warn in show() when running a non-interactive backened headless.#12267
Don't warn in show() when running a non-interactive backened headless.#12267anntzer wants to merge 1 commit intomatplotlib:masterfrom
Conversation
|
Not sure about this; users might still want to be warned about unnecessary calls to |
|
I think the motivation is that this spams the doc builds with thousands of these messages. I think this is fine. I think the issue the warning addresses is not headless servers, but people running with a monitor who are surprised when |
|
Generally, I support the direction this is taking. @dstansby if you think there needs to be more selective control, one could introduce additional values like „when-headless“. Btw.: Are there usecases when I want to control the behavior selectively per call? I would probably use the same value for a whole session or program. To me, the whole topic feels like it should rather be a config option than a function parameter. |
Yes. (Also CI more generally, specifically https://github.com/anntzer/mplcursors/blob/v0.2.1/tests/test_mplcursors.py#L614)
Let's not. If you really want to control it, just wrap it in your own warnings.catch_warnings...
Likely not, but it's also exceedingly rare to call show() multiple times so it seems good enough to have the "config" for it as a function kwarg... I think having a global config for it would just make things more convoluted. |
|
This may be more pressing since doc builds are now failing due to this warning. |
|
I still see this in doc builds though: so will it help? |
|
Ooops, hmm! |
On Linux, $DISPLAY is unset, then we can't run a GUI toolkit anyways, so don't warn about that in `show()`. Delete the Note in the docstring which was redundant with the Parameters entry.
37190ec to
4e5419c
Compare
|
rebased, let's see whether the build passes... edit: apparently no... |
|
Wasn't this applied as part of #12322? |
|
Yes. |
|
(remilestoned to match #12322). |
On Linux, $DISPLAY is unset, then we can't run a GUI toolkit anyways, so
don't warn about that in
show().Delete the Note in the docstring which was redundant with the Parameters
entry.
PR Summary
PR Checklist