Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Warn if MPLBACKEND is invalid. #6699
Conversation
mdboom
added the
needs_review
label
Jul 6, 2016
|
Hi Anthony,
Else it looks good. I'd also be fine raising an error. |
|
Actually the error message already contains the list of valid backends (you can see it by calling explicitly |
|
I finally understand what is going on. I think a warning is fine for now: that's the current behaviour when the matplotlibrc ba kend is set to an unknown backend so it is at least consistent with the behaviour when using matplotlibrc. In general, I think it might be worth be more strict and throw errors when options are set to wrong values, but this behaviour needs to be consistent. |
tacaswell
added this to the
2.1 (next point release)
milestone
Jul 6, 2016
|
I lean toward error as well. |
|
"In the face of ambiguity, resist the temptation to guess." I'd say the zen argues for an error here. |
tacaswell
added needs_revision and removed needs_review
labels
Jul 12, 2016
|
Consensus seems to be to raise if invalid. |
|
That makes the patch even more trivial. |
tacaswell
added needs_review and removed needs_revision
labels
Jul 12, 2016
|
Do you mind changing l. 1455 and l. 1105 (that will require more work) as well to have the error raised consistently. |
|
Changing l.1455 is probably a no-go (because other applications may be using matplotlib and using Changing l.1105 comes down to switching the default value of |
|
I agree on 1455 having to stay as it is for being able to pass things through. I ma not sure about L1105, that makes all rcparsing raise. That should probably get wider discussion. |
anntzer commentedJul 6, 2016
I could be convinced to make this an error actually.