Skip to content
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

Do not trigger backend auto-resolution #26

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shaperilio
Copy link

Current matplotlib will selected a backend if none is already selected when calling get_backend. It should not be used if you just want to know what the backend is.

See #25.

@@ -208,9 +208,9 @@ def configure_inline_support(shell, backend):

def _enable_matplotlib_integration():
"""Enable extra IPython matplotlib integration when we are loaded as the matplotlib backend."""
from matplotlib import get_backend
from matplotlib import _get_backend_or_none
Copy link
Member

Choose a reason for hiding this comment

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

The problem I see with this approach is that you're using a private function for it. So, if Matplotlib API changes in the future, this would break.

Pinging @tacaswell about it to see what he thinks.

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.

2 participants