From 6ce6acd292e71a655c0f7af6d32a463d4084656926e9ed161b1d622ac558d40e Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Thu, 2 Feb 2023 17:20:05 +0000 Subject: [PATCH] Accepting request 1062690 from home:bnavigator:branches:devel:languages:python:jupyter - Modify Example.ipynb because nbval 0.10 abolished saving the input history OBS-URL: https://build.opensuse.org/request/show/1062690 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyterlab-pygments?expand=0&rev=14 --- Example.ipynb | 7 +++++-- python-jupyterlab-pygments.changes | 6 ++++++ python-jupyterlab-pygments.spec | 5 +++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Example.ipynb b/Example.ipynb index 5793f0d..7516a78 100644 --- a/Example.ipynb +++ b/Example.ipynb @@ -18,6 +18,7 @@ "metadata": {}, "outputs": [], "source": [ + "mycode = \"\"\"\n", "class PythonCode:\n", " def __init__(self, value):\n", " self.value = value\n", @@ -25,7 +26,9 @@ " def _repr_html_(self, **kwargs):\n", " formatter = HtmlFormatter(style=JupyterStyle)\n", " html = highlight(self.value, PythonLexer(), formatter)\n", - " return f'
{html}
'" + " return f'
{html}
'\n", + "\"\"\"\n", + "exec(mycode)" ] }, { @@ -41,7 +44,7 @@ "metadata": {}, "outputs": [], "source": [ - "PythonCode(In[2])" + "PythonCode(mycode)" ] } ], diff --git a/python-jupyterlab-pygments.changes b/python-jupyterlab-pygments.changes index cc3b42b..83009f9 100644 --- a/python-jupyterlab-pygments.changes +++ b/python-jupyterlab-pygments.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 2 17:16:28 UTC 2023 - Ben Greiner + +- Modify Example.ipynb because nbval 0.10 abolished saving the + input history + ------------------------------------------------------------------- Sun Dec 25 11:39:59 UTC 2022 - Ben Greiner diff --git a/python-jupyterlab-pygments.spec b/python-jupyterlab-pygments.spec index b5f2c6f..55c85e4 100644 --- a/python-jupyterlab-pygments.spec +++ b/python-jupyterlab-pygments.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -33,7 +33,8 @@ License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/jupyterlab/jupyterlab_pygments Source: https://files.pythonhosted.org/packages/py2.py3/j/jupyterlab-pygments/jupyterlab_pygments-%{version}-py2.py3-none-any.whl -Source1: https://raw.githubusercontent.com/jupyterlab/jupyterlab_pygments/%{version}/notebooks/Example.ipynb +# Slightly modified from https://github.com/jupyterlab/jupyterlab_pygments/blob/0.2.2/notebooks/Example.ipynb +Source1: Example.ipynb BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module pip} BuildRequires: fdupes