diff --git a/altair/v1/__init__.py b/altair/v1/__init__.py
index 6239d9e1..62db76eb 100644
--- a/altair/v1/__init__.py
+++ b/altair/v1/__init__.py
@@ -43,6 +43,7 @@ from .api import (
     OneOfFilter,
     MaxRowsExceeded,
     enable_mime_rendering,
+    disable_mime_rendering
 )
 
 from ..datasets import (
diff --git a/altair/v1/api.py b/altair/v1/api.py
index 51135a9e..1b0ecea0 100644
--- a/altair/v1/api.py
+++ b/altair/v1/api.py
@@ -64,6 +64,8 @@ DEFAULT_MAX_ROWS = 5000
 # Rendering configuration
 #*************************************************************************
 
+_original_ipython_display_ = None
+
 # This is added to TopLevelMixin as a method if MIME rendering is enabled
 def _repr_mimebundle_(self, include, exclude, **kwargs):
     """Return a MIME-bundle for rich display in the Jupyter Notebook."""
@@ -75,8 +77,22 @@ def _repr_mimebundle_(self, include, exclude, **kwargs):
 def enable_mime_rendering():
     """Enable MIME bundle based rendering used in JupyterLab/nteract."""
     # This is what makes Python fun!
-    delattr(TopLevelMixin, '_ipython_display_')
-    TopLevelMixin._repr_mimebundle_ = _repr_mimebundle_
+    global _original_ipython_display_
+    if _original_ipython_display_ is None:
+        TopLevelMixin._repr_mimebundle_ = _repr_mimebundle_
+        _original_ipython_display_ = TopLevelMixin._ipython_display_
+        delattr(TopLevelMixin, '_ipython_display_')
+
+
+def disable_mime_rendering():
+    """Disable MIME bundle based rendering used in JupyterLab/nteract."""
+    global _original_ipython_display_
+    if _original_ipython_display_ is not None:
+        delattr(TopLevelMixin, '_repr_mimebundle_')
+        TopLevelMixin._ipython_display_ = _original_ipython_display_
+        _original_ipython_display_ = None
+
+
 
 #*************************************************************************
 # Channel Aliases

Safer enabling of MIME rendering
Right now the `enable_mime_rendering()` function is not very safe:

* Can't call twice.
* Can't disable.

Easy to fix, but need to wait for #377 to be merged.
diff --git a/altair/expr/tests/test_expr.py b/altair/expr/tests/test_expr.py
index 2c3b981b..328d64e5 100644
--- a/altair/expr/tests/test_expr.py
+++ b/altair/expr/tests/test_expr.py
@@ -112,7 +112,7 @@ def test_getitem_list(data):
     assert set(dir(df2)) == {'xxx', 'yyy', 'calculated'}
 
     # changing df2 shouldn't affect df1
-    df2['qqq'] = df2.xxx / df2.yyy
+    df2['qqq'] = df2.xxx // df2.yyy
     assert set(dir(df2)) == {'xxx', 'yyy', 'calculated', 'qqq'}
     assert set(dir(df)) == {'xxx', 'yyy', 'zzz', 'calculated'}
 
diff --git a/altair/v1/tests/test_api.py b/altair/v1/tests/test_api.py
index b1e14e3a..75dacfce 100644
--- a/altair/v1/tests/test_api.py
+++ b/altair/v1/tests/test_api.py
@@ -448,7 +448,7 @@ def test_chart_serve():
 
 
 def test_formula_expression():
-     formula = Formula('blah', expr.log(expr.df.value) / expr.LN10)
+     formula = Formula('blah', expr.log(expr.df.value) // expr.LN10)
      assert formula.field == 'blah'
      assert formula.expr == '(log(datum.value)/LN10)'
 
@@ -579,3 +579,11 @@ def test_schema_url():
 
     # Make sure that $schema
     chart = Chart.from_dict(dct)
+
+
+def test_enable_mime_rendering():
+    # Make sure these functions are safe to call multiple times.
+    enable_mime_rendering()
+    enable_mime_rendering()
+    disable_mime_rendering()
+    disable_mime_rendering()

pip install -e .
parse_log_pytest
requirements.txt
pytest pytest-cov
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
-e git+https://github.com/altair-viz/altair.git@dfed1d404821e21c25413579f8506b4be05561ad#egg=altair
attrs==22.2.0
backcall==0.2.0
certifi==2021.5.30
coverage==6.2
decorator==5.1.1
importlib-metadata==4.8.3
iniconfig==1.1.1
ipython==7.16.3
ipython-genutils==0.2.0
jedi==0.17.2
numpy==1.19.5
packaging==21.3
pandas==1.1.5
parso==0.7.1
pexpect==4.9.0
pickleshare==0.7.5
pluggy==1.0.0
prompt-toolkit==3.0.36
ptyprocess==0.7.0
py==1.11.0
Pygments==2.14.0
pyparsing==3.1.4
pytest==7.0.1
pytest-cov==4.0.0
python-dateutil==2.9.0.post0
pytz==2025.2
six==1.17.0
tomli==1.2.3
traitlets==4.3.3
typing_extensions==4.1.1
vega==0.4.4
wcwidth==0.2.13
zipp==3.6.0

name: altair
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - backcall==0.2.0
      - coverage==6.2
      - decorator==5.1.1
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - ipython==7.16.3
      - ipython-genutils==0.2.0
      - jedi==0.17.2
      - numpy==1.19.5
      - packaging==21.3
      - pandas==1.1.5
      - parso==0.7.1
      - pexpect==4.9.0
      - pickleshare==0.7.5
      - pluggy==1.0.0
      - prompt-toolkit==3.0.36
      - ptyprocess==0.7.0
      - py==1.11.0
      - pygments==2.14.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - six==1.17.0
      - tomli==1.2.3
      - traitlets==4.3.3
      - typing-extensions==4.1.1
      - vega==0.4.4
      - wcwidth==0.2.13
      - zipp==3.6.0
prefix: /opt/conda/envs/altair

altair/v1/tests/test_api.py::test_enable_mime_rendering
altair/v1/tests/test_api.py::test_savechart_html altair/v1/tests/test_api.py::test_savechart_json altair/v1/tests/test_api.py::test_Chart_from_dict altair/v1/tests/test_api.py::test_to_python altair/v1/tests/test_api.py::test_to_python_stocks altair/v1/tests/test_api.py::test_data_finalization altair/v1/tests/test_api.py::test_layered_chart_iadd altair/v1/tests/test_api.py::test_chart_add altair/v1/tests/test_api.py::test_chart_to_json altair/v1/tests/test_api.py::test_chart_serve altair/v1/tests/test_api.py::test_max_rows altair/v1/tests/test_api.py::test_schema_url
altair/expr/tests/test_expr.py::test_dataframe_namespace altair/expr/tests/test_expr.py::test_dataframe_newcols altair/expr/tests/test_expr.py::test_unary_operations altair/expr/tests/test_expr.py::test_binary_operations altair/expr/tests/test_expr.py::test_abs altair/expr/tests/test_expr.py::test_expr_funcs altair/expr/tests/test_expr.py::test_expr_consts altair/expr/tests/test_expr.py::test_getitem_list altair/expr/tests/test_expr.py::test_json_reprs altair/v1/tests/test_api.py::test_default_mark altair/v1/tests/test_api.py::test_mark_methods altair/v1/tests/test_api.py::test_chart_url_input altair/v1/tests/test_api.py::test_chart_to_html altair/v1/tests/test_api.py::test_chart_to_json_round_trip altair/v1/tests/test_api.py::test_encode_update altair/v1/tests/test_api.py::test_configure_update altair/v1/tests/test_api.py::test_configure_axis_update altair/v1/tests/test_api.py::test_configure_cell_update altair/v1/tests/test_api.py::test_configure_legend_update altair/v1/tests/test_api.py::test_configure_mark_update altair/v1/tests/test_api.py::test_configure_scale_update altair/v1/tests/test_api.py::test_configure_facet_axis_update altair/v1/tests/test_api.py::test_configure_facet_cell_update altair/v1/tests/test_api.py::test_configure_facet_grid_update altair/v1/tests/test_api.py::test_configure_facet_scale_update altair/v1/tests/test_api.py::test_transform_update altair/v1/tests/test_api.py::test_Chart_load_example altair/v1/tests/test_api.py::test_to_python_with_methods altair/v1/tests/test_api.py::test_mark_config[area] altair/v1/tests/test_api.py::test_mark_config[bar] altair/v1/tests/test_api.py::test_mark_config[line] altair/v1/tests/test_api.py::test_mark_config[point] altair/v1/tests/test_api.py::test_mark_config[text] altair/v1/tests/test_api.py::test_mark_config[tick] altair/v1/tests/test_api.py::test_mark_config[rule] altair/v1/tests/test_api.py::test_mark_config[circle] altair/v1/tests/test_api.py::test_mark_config[square] altair/v1/tests/test_api.py::test_mark_config[errorBar] altair/v1/tests/test_api.py::test_config_methods[params0] altair/v1/tests/test_api.py::test_config_methods[params1] altair/v1/tests/test_api.py::test_config_methods[params2] altair/v1/tests/test_api.py::test_config_methods[params3] altair/v1/tests/test_api.py::test_config_facet_grid altair/v1/tests/test_api.py::test_finalize altair/v1/tests/test_api.py::test_formula_expression altair/v1/tests/test_api.py::test_filter_expression altair/v1/tests/test_api.py::test_df_formula altair/v1/tests/test_api.py::test_df_filter altair/v1/tests/test_api.py::test_df_filter_multiple altair/v1/tests/test_api.py::test_chart_dir altair/v1/tests/test_api.py::test_empty_traits
altair/v1/__init__.py altair/v1/api.py
altair/v1/__init__.py altair/v1/api.py