{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/11600","repository_url":"https://api.github.com/repos/matplotlib/matplotlib","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/11600/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/11600/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/11600/events","html_url":"https://github.com/matplotlib/matplotlib/pull/11600","id":339256860,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5OTYwMDQz","number":11600,"title":"backend switching -- don't create a public fallback API","user":{"login":"anntzer","id":1322974,"node_id":"MDQ6VXNlcjEzMjI5NzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1322974?v=4","gravatar_id":"","url":"https://api.github.com/users/anntzer","html_url":"https://github.com/anntzer","followers_url":"https://api.github.com/users/anntzer/followers","following_url":"https://api.github.com/users/anntzer/following{/other_user}","gists_url":"https://api.github.com/users/anntzer/gists{/gist_id}","starred_url":"https://api.github.com/users/anntzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anntzer/subscriptions","organizations_url":"https://api.github.com/users/anntzer/orgs","repos_url":"https://api.github.com/users/anntzer/repos","events_url":"https://api.github.com/users/anntzer/events{/privacy}","received_events_url":"https://api.github.com/users/anntzer/received_events","type":"User","site_admin":false},"labels":[{"id":155360,"node_id":"MDU6TGFiZWwxNTUzNjA=","url":"https://api.github.com/repos/matplotlib/matplotlib/labels/Release%20critical","name":"Release critical","color":"b60205","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/23","html_url":"https://github.com/matplotlib/matplotlib/milestone/23","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/23/labels","id":1542657,"node_id":"MDk6TWlsZXN0b25lMTU0MjY1Nw==","number":23,"title":"v3.0","description":"Big ticket items:\r\n\r\n - drop support for python 2","creator":{"login":"tacaswell","id":199813,"node_id":"MDQ6VXNlcjE5OTgxMw==","avatar_url":"https://avatars3.githubusercontent.com/u/199813?v=4","gravatar_id":"","url":"https://api.github.com/users/tacaswell","html_url":"https://github.com/tacaswell","followers_url":"https://api.github.com/users/tacaswell/followers","following_url":"https://api.github.com/users/tacaswell/following{/other_user}","gists_url":"https://api.github.com/users/tacaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/tacaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacaswell/subscriptions","organizations_url":"https://api.github.com/users/tacaswell/orgs","repos_url":"https://api.github.com/users/tacaswell/repos","events_url":"https://api.github.com/users/tacaswell/events{/privacy}","received_events_url":"https://api.github.com/users/tacaswell/received_events","type":"User","site_admin":false},"open_issues":174,"closed_issues":481,"state":"open","created_at":"2016-01-25T21:06:49Z","updated_at":"2018-07-09T04:35:59Z","due_on":"2018-07-01T07:00:00Z","closed_at":null},"comments":5,"created_at":"2018-07-08T20:52:37Z","updated_at":"2018-07-09T06:35:53Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/11600","html_url":"https://github.com/matplotlib/matplotlib/pull/11600","diff_url":"https://github.com/matplotlib/matplotlib/pull/11600.diff","patch_url":"https://github.com/matplotlib/matplotlib/pull/11600.patch"},"body":"Alternative version of #11581, following in particular @timhoffm's comments.\r\n\r\nThe difference is that instead of allowing assigning a list to `rcParams[\"backend\"]` and having implicit fallback (an admittedly awkward API), we use a private, magic value as default that triggers the fallback.  This should still be enough to fix most issues with downstream packagers.\r\n\r\nA public fallback API would come (or not) with python-syntax matplotlibrcs (`for backend in ...: try: use(backend); except ImportError: pass`).\r\n\r\nI think I prefer this version.\r\n\r\n---\r\n\r\nSee changes documented in the API changes file.\r\n\r\nSome followup cleanup (of the now unused old machinery) will come as a\r\nseparate PR (left some \"FIXME: Remove.\" comments).\r\n\r\nChanges to the build process (namely, getting rid of trying to detect\r\nthe default backend in setupext.py) will come as a separate PR.\r\n\r\nI inlined pylab_setup into switch_backend (and deprecated the old\r\nversion of pylab_setup) because otherwise the typical call stack would\r\nbe `use()` -> `set rcParams['backend'] = ...` -> `switch_backend()` ->\r\n`pylab_setup()`, which is a bit of a mess; at least we can get rid of\r\none of the layers.\r\n\r\n## PR Summary\r\n\r\n## PR Checklist\r\n\r\n- [ ] Has Pytest style unit tests\r\n- [ ] Code is PEP 8 compliant\r\n- [ ] New features are documented, with examples if plot related\r\n- [ ] Documentation is sphinx and numpydoc compliant\r\n- [ ] Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)\r\n- [ ] Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way\r\n\r\n<!--\r\nThank you so much for your PR!  To help us review your contribution, please\r\nconsider the following points:\r\n\r\n- A development guide is available at https://matplotlib.org/devdocs/devel/index.html.\r\n\r\n- Help with git and github is available at\r\n  https://matplotlib.org/devel/gitwash/development_workflow.html.\r\n\r\n- Do not create the PR out of master, but out of a separate branch.\r\n\r\n- The PR title should summarize the changes, for example \"Raise ValueError on\r\n  non-numeric input to set_xlim\".  Avoid non-descriptive titles such as\r\n  \"Addresses issue #8576\".\r\n\r\n- The summary should provide at least 1-2 sentences describing the pull request\r\n  in detail (Why is this change required?  What problem does it solve?) and\r\n  link to any relevant issues.\r\n\r\n- If you are contributing fixes to docstrings, please pay attention to\r\n  http://matplotlib.org/devel/documenting_mpl.html#formatting.  In particular,\r\n  note the difference between using single backquotes, double backquotes, and\r\n  asterisks in the markup.\r\n\r\nWe understand that PRs can sometimes be overwhelming, especially as the\r\nreviews start coming in.  Please let us know if the reviews are unclear or\r\nthe recommended next step seems overly demanding, if you would like help in\r\naddressing a reviewer's comments, or if you have been waiting too long to hear\r\nback on your PR.\r\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/403374379","html_url":"https://github.com/matplotlib/matplotlib/pull/11600#issuecomment-403374379","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/11600","id":403374379,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzM3NDM3OQ==","user":{"login":"timhoffm","id":2836374,"node_id":"MDQ6VXNlcjI4MzYzNzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/2836374?v=4","gravatar_id":"","url":"https://api.github.com/users/timhoffm","html_url":"https://github.com/timhoffm","followers_url":"https://api.github.com/users/timhoffm/followers","following_url":"https://api.github.com/users/timhoffm/following{/other_user}","gists_url":"https://api.github.com/users/timhoffm/gists{/gist_id}","starred_url":"https://api.github.com/users/timhoffm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timhoffm/subscriptions","organizations_url":"https://api.github.com/users/timhoffm/orgs","repos_url":"https://api.github.com/users/timhoffm/repos","events_url":"https://api.github.com/users/timhoffm/events{/privacy}","received_events_url":"https://api.github.com/users/timhoffm/received_events","type":"User","site_admin":false},"created_at":"2018-07-09T06:35:53Z","updated_at":"2018-07-09T06:35:53Z","author_association":"MEMBER","body":"I am aware that the current backend being stashed in rcParams is the existing behavior. So far, this is read-only (setting the rcParam when a current backend exists has no effect). This is not great, but both easy to cope with if we want to evolve the API, and likely not used very often.\r\n\r\nThis PR adds setting-capability through rcParams. IMO it's a movement in the wrong direction. We make more users aware of this poor API. And the added functionality will make it harded to smoothly migrate to a better API later. ***I strongly suggest not to go down this road.***\r\n\r\nThere are better ways to bring in the backend-switching functionality. Unfortunately, I don't have the time to write the design out now, but I will do so tonight. Please wait with further decisions until then, if at all possible."}}
{"actor":{"display_login":"timhoffm"}}