Skip to content

Commit

Permalink
git subrepo clone --branch=interactive_matplotlib --force https://git…
Browse files Browse the repository at this point in the history
…hub.com/impact27/spyder-kernels.git external-deps/spyder-kernels

subrepo:
  subdir:   "external-deps/spyder-kernels"
  merged:   "961305dcf"
upstream:
  origin:   "https://github.com/impact27/spyder-kernels.git"
  branch:   "interactive_matplotlib"
  commit:   "961305dcf"
git-subrepo:
  version:  "0.4.1"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "a04d8c2"
  • Loading branch information
Quentin Peter committed Dec 20, 2020
1 parent 1cbaf18 commit b087203
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
6 changes: 3 additions & 3 deletions external-deps/spyder-kernels/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
;
[subrepo]
remote = https://github.com/spyder-ide/spyder-kernels.git
branch = 1.x
commit = aaacb2da08305b24a9d9e8d345801794b5251a9b
parent = 6b908df720e9e8ed5f16e410c0f81650da03b35c
branch = interactive_matplotlib
commit = 961305dcfe5dcb3a5a328c8e1b5b74e5dfdc3a64
parent = 1cbaf187002334b94ff2414175b816f4f524bac2
method = merge
cmdver = 0.4.1
14 changes: 13 additions & 1 deletion external-deps/spyder-kernels/spyder_kernels/console/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
from spyder_kernels.comms.frontendcomm import FrontendComm
from spyder_kernels.py3compat import PY3, input
from spyder_kernels.utils.misc import (
MPL_BACKENDS_FROM_SPYDER, MPL_BACKENDS_TO_SPYDER, INLINE_FIGURE_FORMATS)
MPL_BACKENDS_FROM_SPYDER, MPL_BACKENDS_TO_SPYDER, INLINE_FIGURE_FORMATS,
automatic_backend)


# Excluded variables from the Variable Explorer (i.e. they are not
Expand Down Expand Up @@ -54,6 +55,17 @@ def get_local_scope(self, stack_depth):
else:
return frame.f_locals

def enable_matplotlib(self, gui=None):
"""Enable matplotlib."""
if gui.lower() == "auto":
gui = automatic_backend()
gui, backend = super(SpyderShell, self).enable_matplotlib(gui)
try:
self.kernel.frontend_call(blocking=False).update_matplotlib_gui(gui)
except Exception:
pass
return gui, backend


class SpyderKernel(IPythonKernel):
"""Spyder kernel for Jupyter."""
Expand Down

0 comments on commit b087203

Please sign in to comment.