Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FIX: Be sure matplotlib.backends is imported before we use it #18026

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
Jul 23, 2020

Conversation

tacaswell
Copy link
Member

PR Summary

If the user specifies the backend via 'module://XZY' there in no
guarantee that they have imported matplotilb.backends (which is
an empty __init__.py) as part of their module which results in an
AttributeError when we monkeypatch the backend name into it.

closes #18022

PR Checklist

  • Has Pytest style unit tests (depends on import order)
  • Code is Flake 8 compliant

If the user specifies the backend via `'module://XZY'` there in no
guarantee that they have imported `matplotilb.backends` (which is
an empty `__init__.py`) as part of their module which results in an
AttributeError when we monkeypatch the backend name into it.

closes matplotlib#18022
@tacaswell tacaswell added this to the v3.3.1 milestone Jul 22, 2020
@jklymak jklymak requested a review from anntzer July 22, 2020 23:56
@timhoffm timhoffm merged commit 4c43774 into matplotlib:master Jul 23, 2020
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jul 23, 2020
timhoffm added a commit that referenced this pull request Jul 23, 2020
…026-on-v3.3.x

Backport PR #18026 on branch v3.3.x (FIX: Be sure matplotlib.backends is imported before we use it)
@tacaswell tacaswell deleted the fix_custom_backend branch July 30, 2020 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError: module 'matplotlib' has no attribute 'backends'
4 participants