Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-voila for openSUSE:Factory checked in at 2022-10-06 07:41:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-voila (Old) and /work/SRC/openSUSE:Factory/.python-voila.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-voila" Thu Oct 6 07:41:50 2022 rev:16 rq:1008126 version:0.3.6 Changes: -------- --- /work/SRC/openSUSE:Factory/python-voila/python-voila.changes 2022-09-12 19:08:12.950530871 +0200 +++ /work/SRC/openSUSE:Factory/.python-voila.new.2275/python-voila.changes 2022-10-06 07:42:01.032662341 +0200 @@ -1,0 +2,6 @@ +Wed Oct 5 07:25:19 UTC 2022 - Daniel Garcia <[email protected]> + +- Add update-nbconvert.patch: + * Support python-nbconvert < 8 + +------------------------------------------------------------------- New: ---- update-nbconvert.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-voila.spec ++++++ --- /var/tmp/diff_new_pack.zyA9QU/_old 2022-10-06 07:42:01.580663561 +0200 +++ /var/tmp/diff_new_pack.zyA9QU/_new 2022-10-06 07:42:01.584663570 +0200 @@ -44,6 +44,9 @@ # PATCH-FIX-UPSTREAM Support ipywidgets 8, based on # gh#voila-dashboards/voila#1193 Patch0: support-ipywidgets-8.patch +# PATCH-FIX-UPSTREAM update-nbconvert.patch based on +# gh#voila-dashboards/voila#1161 +Patch1: update-nbconvert.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module jupyter-packaging >= 0.10} BuildRequires: %{python_module setuptools} @@ -52,12 +55,12 @@ BuildRequires: jupyter-notebook-filesystem BuildRequires: python-rpm-macros Requires: jupyter-voila = %{version} -Requires: python-nbclient >= 0.4 Requires: python-websockets >= 9.0 Requires: (python-jupyter-client >= 6.1.3 with python-jupyter-client < 8) Requires: (python-jupyter-server >= 1.18 with python-jupyter-server < 2) Requires: (python-jupyterlab-server >= 2.3.0 with python-jupyterlab-server < 3) -Requires: (python-nbconvert >= 6.4.5 with python-nbconvert < 7) +Requires: (python-nbclient >= 0.4.0 with python-nbclient < 0.7) +Requires: (python-nbconvert >= 6.4.5 with python-nbconvert < 8) Requires: (python-traitlets >= 5.0.3 with python-traitlets < 6) BuildArch: noarch %if %{with libalternatives} @@ -121,6 +124,7 @@ # '.' is now considered 'hidden', which is not allowed. sed -i 's|./jupyter.svg|jupyter.svg|' tests/notebooks/images.ipynb %patch0 -p1 +%patch1 -p1 %build %python_build ++++++ update-nbconvert.patch ++++++ Index: voila-0.3.6/setup.cfg =================================================================== --- voila-0.3.6.orig/setup.cfg +++ voila-0.3.6/setup.cfg @@ -36,8 +36,8 @@ install_requires = jupyter_server>=1.18,<2.0.0 jupyterlab_server>=2.3.0,<3 jupyter_client>=6.1.3,<8 - nbclient>=0.4.0 - nbconvert>=6.4.5,<7 + nbclient>=0.4.0,<0.7 + nbconvert>=6.4.5,<8 websockets>=9.0 traitlets>=5.0.3,<6 Index: voila-0.3.6/voila/exporter.py =================================================================== --- voila-0.3.6.orig/voila/exporter.py +++ voila-0.3.6/voila/exporter.py @@ -28,21 +28,25 @@ from .utils import create_include_assets class VoilaMarkdownRenderer(IPythonRenderer): """Custom markdown renderer that inlines images""" + def __init__(self, contents_manager, *args, **kwargs): + self.contents_manager = contents_manager + super().__init__(*args, **kwargs) + def image(self, src, title, text): - contents_manager = self.options['contents_manager'] + contents_manager = self.contents_manager if contents_manager.file_exists(src): content = contents_manager.get(src, format='base64') data = content['content'].replace('\n', '') # remove the newline mime_type, encoding = mimetypes.guess_type(src) src = 'data:{mime_type};base64,{data}'.format(mime_type=mime_type, data=data) - return super(VoilaMarkdownRenderer, self).image(src, title, text) + return super().image(src, title, text) class VoilaExporter(HTMLExporter): """Custom HTMLExporter that inlines the images using VoilaMarkdownRenderer""" base_url = traitlets.Unicode(help="Base url for resources").tag(config=True) - markdown_renderer_class = traitlets.Type('nbconvert.vendor.mistune.Renderer').tag(config=True) + markdown_renderer_class = traitlets.Type(VoilaMarkdownRenderer).tag(config=True) # Can be a ContentsManager from notebook or jupyter_server, so Any will have to do for now contents_manager = traitlets.Any()
