Skip to content

Propagate changes to backend loading to setup/setupext. #11962

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

Merged
merged 1 commit into from
Sep 15, 2018

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Aug 28, 2018

  1. Restore the ability to set the default backend from setup.cfg (finishes closing Backend related issues with matplotlib 3.0.0rc1 #11844 attn @tacaswell).
  2. Remove the backend fallback code.

Note that not including mpl-data/*.glade in the package data is fine:
that file had been removed in 962388f anyways.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzer anntzer added this to the v3.0 milestone Aug 28, 2018
@anntzer anntzer added the Build label Aug 28, 2018
1) Restore the ability to set the default backend from setup.cfg.
2) Remove the backend fallback code.

Note that not including `mpl-data/*.glade` in the package data is fine:
that file had been removed in 962388f anyways.
@tacaswell
Copy link
Member

Thanks @anntzer !

@tacaswell tacaswell added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Aug 28, 2018
@mdboom
Copy link
Member

mdboom commented Aug 30, 2018

For those building from source (which I'm sure is a decreasing number), this is bound to cause confusion because it will no longer attempt to pick the "best" backend for their system.

For packagers, just telling them to set things with setup.cfg (which has worked for a long time, but wasn't the default) is clearly a step forward.

I think optimizing for the common case, this makes sense. But maybe to make the first faction happy we should say something at the end of compilation like: "Your default backend is set to X. This may not be optimal for your system."?

@@ -81,10 +75,9 @@
#
# The Agg, Ps, Pdf and SVG backends do not require external dependencies. Do
# not choose MacOSX, or TkAgg if you have disabled the relevant extension
# modules. Agg will be used by default.
# modules. The default is determined by fallback.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this change. Isn't the fallback approach being removed by this PR? (Or is this referring to something else recent that I probably missed while away from the project for the last couple of years...)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fallback has been moved to runtime (not build time).

@anntzer
Copy link
Contributor Author

anntzer commented Aug 30, 2018

Indeed, things changed with #9795 / #11581 / #11600 (sorry the discussion is a bit spread out). We still pick the best backend, but do it at import time now. So the best-backend-picking behavior occurs even when you install from a prebuilt distribution (wheel, linux distro, etc.).

@tacaswell
Copy link
Member

This has infact passed on travis, a webhook just got lost.

@jklymak jklymak requested a review from QuLogic September 10, 2018 19:08
@tacaswell tacaswell merged commit dadb8d0 into matplotlib:master Sep 15, 2018
@lumberbot-app
Copy link

lumberbot-app bot commented Sep 15, 2018

Something went wrong ... Please have a look at my logs.

@anntzer anntzer deleted the setupextbackend branch September 15, 2018 20:18
@tacaswell
Copy link
Member

Went ahead and merged this to move 3.0 forward, will do the backport by hand.

tacaswell added a commit to tacaswell/matplotlib that referenced this pull request Sep 15, 2018
BLD: Propagate changes to backend loading to setup/setupext.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants