{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/12152","repository_url":"https://api.github.com/repos/matplotlib/matplotlib","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/12152/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/12152/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/12152/events","html_url":"https://github.com/matplotlib/matplotlib/pull/12152","id":361313685,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2MzE0NDg5","number":12152,"title":"Use _warn_external for deprecations warnings.","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":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-18T13:48:03Z","updated_at":"2018-09-18T13:59:54Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/12152","html_url":"https://github.com/matplotlib/matplotlib/pull/12152","diff_url":"https://github.com/matplotlib/matplotlib/pull/12152.diff","patch_url":"https://github.com/matplotlib/matplotlib/pull/12152.patch"},"body":"We'll probably switch to _warn_external everywhere at some point, but in\r\nthe meantime I think deprecations warnings are ones of those that\r\nbenefit the most from warn_external (\"oh, that's the place that needs to\r\nbe fixed.\").\r\n\r\nNote the internal import to workaround the circular import loop between\r\ncbook and cbook.deprecation.\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 [Flake 8](http://flake8.pycqa.org/en/latest/) 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/422404363","html_url":"https://github.com/matplotlib/matplotlib/pull/12152#issuecomment-422404363","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/12152","id":422404363,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjQwNDM2Mw==","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},"created_at":"2018-09-18T13:59:54Z","updated_at":"2018-09-18T13:59:54Z","author_association":"CONTRIBUTOR","body":"https://github.com/matplotlib/matplotlib/pull/11298 but the TLDR is that given an example such as\r\n```\r\nfrom matplotlib import pyplot as plt\r\n\r\nplt.plot([[1, 2], [3, 4]], [[1, 2, 3], [4, 5, 6]])\r\nplt.show()\r\n```\r\ncurrently the warning displayed is\r\n```\r\n/home/antony/src/extern/matplotlib/lib/matplotlib/axes/_base.py:377: MatplotlibDeprecationWarning: \r\ncycling among columns of inputs with non-matching shapes is deprecated.\r\n  cbook.warn_deprecated(\"2.2\", \"cycling among columns of inputs \"\r\n```\r\nbut with the PR the warning becomes\r\n```\r\n/tmp/test.py:3: MatplotlibDeprecationWarning: \r\ncycling among columns of inputs with non-matching shapes is deprecated.\r\n  plt.plot([[1, 2], [3, 4]], [[1, 2, 3], [4, 5, 6]])\r\n```\r\nwhich is quite a bit more helpful in pointing out what needs to be fixed..."}}
{"actor":{"display_login":"anntzer"}}