Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 541993402
  • Loading branch information
metrizable authored and colaboratory-team committed Sep 19, 2023
1 parent 50cb41a commit a7afb11
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions google/colab/_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from ipykernel import jsonutil
from ipykernel import zmqshell
from IPython.core import alias
from IPython.core import compilerop
from IPython.core import inputsplitter
from IPython.core import interactiveshell
from IPython.core import oinspect
Expand All @@ -52,6 +53,16 @@ def _show_pip_warning():
class Shell(zmqshell.ZMQInteractiveShell):
"""Shell with additional Colab-specific features."""

def init_instance_attrs(self):
"""Initializes instance attrs.
Since https://github.com/ipython/ipykernel/pull/597 introduces filename
changes for source files which we parse to get execution count, we use the
original CachingCompiler instead of the custom XCachingCompiler.
"""
super().init_instance_attrs()
self.compile = compilerop.CachingCompiler()

def init_events(self):
self.events = EventManager(self, available_events)
self.events.register('pre_execute', self._clear_warning_registry)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Note: these dependency versions should be kept in-sync with the versions
# specified in the docker container requirements files.
'google-auth==2.17.3',
'ipykernel==5.5.6',
'ipykernel==6.21.3',
'ipython==7.34.0',
'notebook==6.5.5',
'pandas==1.5.3',
Expand Down

0 comments on commit a7afb11

Please sign in to comment.