Skip to content

PyPI wheels should not set default backend #14121

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
anntzer opened this issue May 3, 2019 · 3 comments
Closed

PyPI wheels should not set default backend #14121

anntzer opened this issue May 3, 2019 · 3 comments
Labels

Comments

@anntzer
Copy link
Contributor

anntzer commented May 3, 2019

I just noticed that the wheels on PyPI still set a default backend in their matplotlibrc (to tkagg on linux/windows and to macosx on macos). I think this should change, and we should instead omit the default backend and trigger fallback.

Currently, a linux/windows user who installs matplotlib from pypi and does not bother writing a matplotlibrc always gets tkagg, whereas backend fallback is triggered if (and only if) they explicitly write a matplotlibrc and explicitly ignore the backend: ... entry in it. This seems backwards: I'd say backend fallback is here to help the "unconfigured" case, more than the "you have a config but ignored a key" case. This also invalidates the relevant 3.0 whatsnew entry (https://matplotlib.org/users/whats_new.html#improved-default-backend-selection) in the default case of a PyPI install.

(Also, setting the default backend to macosx on macos is not really helpful -- backend fallback will already choose to use that backend if that works, and, if it doesn't (assuming nonframework builds are still an issue, which I'm not certain about), will perform the required fallback.)

If downstream redistributors want to set a default backend (#11844) that's their problem, but I think setting it on the PyPI wheels defeats some of the purpose of having backend fallback to start with...

Matplotlib version

  • Operating system: any
  • Matplotlib version: 3.0+
  • Matplotlib backend (print(matplotlib.get_backend())): that's the question
  • Python version: any
@amueller
Copy link
Contributor

amueller commented May 6, 2019

Also see @tacaswell's comment here: ContinuumIO/anaconda-issues#10219 (comment)

@tacaswell
Copy link
Member

I believe I have changed this behavior for 3.1 (see MacPython/matplotlib-wheels@39cf18e and MacPython/matplotlib-wheels@73a9f41 )

This should be the case for the rc2 wheels that were just uploaded this morning. I'm going to close this, please ping to re-open if the rc2 wheels do not have this behavior.

@amueller
Copy link
Contributor

amueller commented May 6, 2019

awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants