From b0073e5a9951ecb6aad798efa6b0ce2ffb66c393fd8e89b49b2c0c3eed22242e Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 30 Dec 2021 18:29:35 +0000 Subject: [PATCH 1/2] =?UTF-8?q?-=20Upgrade=20to=20the=20version=206.3.0:?= =?UTF-8?q?=20=20=20-=20Bugfixes:=20=20=20=20=20-=20Update=20state=20filte?= =?UTF-8?q?r=20=20=20=20=20-=20Add=20slide=20numbering=20=20=20=20=20-=20F?= =?UTF-8?q?ix=20HTML=20templates=20mentioned=20in=20help=20docs=20=20=20?= =?UTF-8?q?=20=20-=20Add=20the=20ability=20to=20fully=20customize=20widget?= =?UTF-8?q?=5Frenderer=5Furl=20=20=20=20=20-=20Enable=20users=20to=20custo?= =?UTF-8?q?mize=20MathJax=20URLs=20=20=20=20=20-=20Add=20CLI=20configurati?= =?UTF-8?q?on=20for=20disable-chromium-sandbox=20=20=20=20=20-=20Enables?= =?UTF-8?q?=20webpdf=20to=20be=20rendered=20with=20templates=20=20=20=20?= =?UTF-8?q?=20-=20Adds=20dejavu=20=20=20-=20Significant=20Changes=C2=B6=20?= =?UTF-8?q?=20=20=20=20-=20Dropped=20Python=203.6=20and=20added=20Python?= =?UTF-8?q?=203.9=20=20=20=20=20-=20Convert=20execute=20preprocessor=20wra?= =?UTF-8?q?pper=20to=20resemble=20papermill=20=20=20-=20Comprehensive=20no?= =?UTF-8?q?tes=C2=B6=20=20=20=20=20-=20Feature:=20support=20static=20widge?= =?UTF-8?q?ts=20in=20Reveal.js=20slides=20PR=20=20=20=20=20=20=20#1553:=20?= =?UTF-8?q?=20=20=20=20-=20Feature:=20add=20speaker=20notes=20to=20Reveal.?= =?UTF-8?q?js=20template=20=20=20=20=20-=20Add=20correct=20output=20mimety?= =?UTF-8?q?pe=20to=20WebPDF=20exporter=20=20=20=20=20-=20Set=20mimetype=20?= =?UTF-8?q?for=20webpdf=20correctly=20=20=20=20=20-=20Fix=20docstring=20is?= =?UTF-8?q?sue=20and=20a=20broken=20link=20=20=20=20=20-=20Add=20CLI=20exa?= =?UTF-8?q?mple=20for=20removing=20cell=20tag=20syntax=20=20=20=20=20-=20I?= =?UTF-8?q?nclude=20output=20of=20stdin=20stream=20in=20lab=20template=20?= =?UTF-8?q?=20=20=20=20-=20Don=E2=80=99t=20use=20a=20shell=20to=20call=20i?= =?UTF-8?q?nkscape=20=20=20=20=20-=20JupyterLab=20export=20as=20HTML=20wit?= =?UTF-8?q?h=20widgets=20fails=20to=20load=20=20=20=20=20=20=20widgets=20?= =?UTF-8?q?=20=20=20=20-=20Move=20note=20inside=20Reveal.js=20HTML=20slide?= =?UTF-8?q?show=20=20=20=20=20-=20fix=20issue=201507:=20broken=20command?= =?UTF-8?q?=20line=20option=20=20=20=20=20=20=20=E2=80=93CSSHTMLHeaderPrep?= =?UTF-8?q?rocessor.style=3D=20=20=20=20=20-=20Fix=20order=20of=20template?= =?UTF-8?q?=20paths=20=20=20=20=20-=20Changed=20documentation=20of=20exter?= =?UTF-8?q?nal=5Fexporters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-nbconvert?expand=0&rev=28 --- nbconvert-6.0.7.tar.gz | 3 -- nbconvert-6.3.0.tar.gz | 3 ++ nbconvert.pdf | 4 +-- nbconvert.zip | 4 +-- python-nbconvert.changes | 60 ++++++++++++++++++++++++++++++++++++++++ python-nbconvert.spec | 7 +++-- 6 files changed, 71 insertions(+), 10 deletions(-) delete mode 100644 nbconvert-6.0.7.tar.gz create mode 100644 nbconvert-6.3.0.tar.gz diff --git a/nbconvert-6.0.7.tar.gz b/nbconvert-6.0.7.tar.gz deleted file mode 100644 index 21766db..0000000 --- a/nbconvert-6.0.7.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cbbc13a86dfbd4d1b5dee106539de0795b4db156c894c2c5dc382062bbc29002 -size 896833 diff --git a/nbconvert-6.3.0.tar.gz b/nbconvert-6.3.0.tar.gz new file mode 100644 index 0000000..1c1d7d2 --- /dev/null +++ b/nbconvert-6.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e77d6203854944520105e38f2563a813a4a3708e8563aa598928a3b5ee1081a +size 900850 diff --git a/nbconvert.pdf b/nbconvert.pdf index 23f696b..7e2f806 100644 --- a/nbconvert.pdf +++ b/nbconvert.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:720196ba36473e3fa6bcbb79b1463640730e0e007acb07aba73cfd9adacae0de -size 548761 +oid sha256:416d49e6d1dc1caf39bb8602e705ee3cae46fde88be0bd5686b26e3b8d9f59c6 +size 643265 diff --git a/nbconvert.zip b/nbconvert.zip index 1b74f30..36ef5b1 100644 --- a/nbconvert.zip +++ b/nbconvert.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fbc32a1803eabb59acee50b81e705fe11c285ff42b7a99e7d4c68b3bc0bd1507 -size 8652426 +oid sha256:8e880a151f358d2ce4e9a8a6d234043e108ad38288d12dba4e54e4c6e7e5fd2a +size 4707510 diff --git a/python-nbconvert.changes b/python-nbconvert.changes index 95359b2..380416f 100644 --- a/python-nbconvert.changes +++ b/python-nbconvert.changes @@ -1,3 +1,63 @@ +------------------------------------------------------------------- +Thu Dec 30 18:01:32 UTC 2021 - Matej Cepl + +- Upgrade to the version 6.3.0: + - Bugfixes: + - Update state filter + - Add slide numbering + - Fix HTML templates mentioned in help docs + - Add the ability to fully customize widget_renderer_url + - Enable users to customize MathJax URLs + - Add CLI configuration for disable-chromium-sandbox + - Enables webpdf to be rendered with templates + - Adds dejavu + - Significant Changes¶ + - Dropped Python 3.6 and added Python 3.9 + - Convert execute preprocessor wrapper to resemble papermill + - Comprehensive notes¶ + - Feature: support static widgets in Reveal.js slides PR + #1553: + - Feature: add speaker notes to Reveal.js template + - Add correct output mimetype to WebPDF exporter + - Set mimetype for webpdf correctly + - Fix docstring issue and a broken link + - Add CLI example for removing cell tag syntax + - Include output of stdin stream in lab template + - Don’t use a shell to call inkscape + - JupyterLab export as HTML with widgets fails to load + widgets + - Move note inside Reveal.js HTML slideshow + - fix issue 1507: broken command line option + –CSSHTMLHeaderPreprocessor.style= + - Fix order of template paths + - Changed documentation of external_exporters + - Fix template precedence when using a custom template + - add pip to docs envt + - Fix CI By Adding PIP to conda envt for docs build + - Explicitly install pip in docs environment.yml + - small update to docs hide cell + - Allow child templates to override mathjax + - Allow get_export_names to skip configuration check + - Update docs: Tex Live package on Ubuntu + - Test jupyter_client + - Update jupyterlab css + - Webpdf: Use a temporary file instead of an URL + - Applied patch for marking network changes + - Change webpdf display name + - Allow disabling pyppeteer sandbox + - Make pagination configurable in webpdf + - Fix Reveal.js version in documentation + - Fix dangling reference to get_template_paths() + - Solved svg2pdf conversion error if Inkscape is installed + into the default path on a windows machine + - Update version dependency of traitlets + - Update execute.py + - Fix code output indentation when running nbconvert + –no-input + - #1428 add docstring + - Update nbconvert_library.ipynb + - Supports isolated iframe when converting to HTML + ------------------------------------------------------------------- Sat Oct 30 17:35:42 UTC 2021 - Ben Greiner diff --git a/python-nbconvert.spec b/python-nbconvert.spec index fa16b19..7d8dca3 100644 --- a/python-nbconvert.spec +++ b/python-nbconvert.spec @@ -1,5 +1,5 @@ # -# spec file for package python-nbconvert +# spec file # # Copyright (c) 2021 SUSE LLC # @@ -28,9 +28,9 @@ # Note: only update to > 6.0 when there is no python36 Jupyter stack anymore %{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 -%define doc_ver 6.0.7 +%define doc_ver 6.3.0 Name: python-nbconvert%{psuffix} -Version: 6.0.7 +Version: 6.3.0 Release: 0 Summary: Conversion of Jupyter Notebooks License: BSD-3-Clause @@ -186,6 +186,7 @@ popd %files -n jupyter-nbconvert %license LICENSE %{_bindir}/jupyter-nbconvert +%{_bindir}/jupyter-dejavu %dir %{_datadir}/jupyter/ %dir %{_datadir}/jupyter/nbconvert %{_datadir}/jupyter/nbconvert/templates From 9059646b58b54afc4a6d1c4012eebc017e856ec600ed7bd5709a44925a02e4d7 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Fri, 31 Dec 2021 16:54:01 +0000 Subject: [PATCH 2/2] Accepting request 943334 from home:bnavigator:branches:devel:languages:python:jupyter:notraitlets5 - Revert to 6.0.7 * We can't have a newer version without traitlets 5. But we can't have traitlets 5 as long as python36 is active - Vendorize mistune 0.8.4 * Add nbconvert-vendorize-mistune.patch * gh#jupyter/nbconvert#1685 - Alternativize flavored entry-point. For 6.3: do it with dejavu OBS-URL: https://build.opensuse.org/request/show/943334 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-nbconvert?expand=0&rev=29 --- mistune-0.8.4.tar.gz | 3 +++ nbconvert-6.0.7.tar.gz | 3 +++ nbconvert-6.3.0.tar.gz | 3 --- nbconvert-vendorize-mistune.patch | 25 +++++++++++++++++++ nbconvert.pdf | 4 +-- nbconvert.zip | 4 +-- python-nbconvert.changes | 11 +++++++++ python-nbconvert.spec | 41 +++++++++++++++++++++++++------ 8 files changed, 79 insertions(+), 15 deletions(-) create mode 100644 mistune-0.8.4.tar.gz create mode 100644 nbconvert-6.0.7.tar.gz delete mode 100644 nbconvert-6.3.0.tar.gz create mode 100644 nbconvert-vendorize-mistune.patch diff --git a/mistune-0.8.4.tar.gz b/mistune-0.8.4.tar.gz new file mode 100644 index 0000000..3b8f288 --- /dev/null +++ b/mistune-0.8.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59a3429db53c50b5c6bcc8a07f8848cb00d7dc8bdb431a4ab41920d201d4756e +size 58322 diff --git a/nbconvert-6.0.7.tar.gz b/nbconvert-6.0.7.tar.gz new file mode 100644 index 0000000..21766db --- /dev/null +++ b/nbconvert-6.0.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cbbc13a86dfbd4d1b5dee106539de0795b4db156c894c2c5dc382062bbc29002 +size 896833 diff --git a/nbconvert-6.3.0.tar.gz b/nbconvert-6.3.0.tar.gz deleted file mode 100644 index 1c1d7d2..0000000 --- a/nbconvert-6.3.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5e77d6203854944520105e38f2563a813a4a3708e8563aa598928a3b5ee1081a -size 900850 diff --git a/nbconvert-vendorize-mistune.patch b/nbconvert-vendorize-mistune.patch new file mode 100644 index 0000000..2efbafa --- /dev/null +++ b/nbconvert-vendorize-mistune.patch @@ -0,0 +1,25 @@ +Index: nbconvert-6.0.7/nbconvert/filters/markdown_mistune.py +=================================================================== +--- nbconvert-6.0.7.orig/nbconvert/filters/markdown_mistune.py ++++ nbconvert-6.0.7/nbconvert/filters/markdown_mistune.py +@@ -18,7 +18,7 @@ except ImportError: + # Python 2 + from cgi import escape as html_escape + +-import mistune ++from nbconvert.vendor import mistune + + from pygments import highlight + from pygments.lexers import get_lexer_by_name +Index: nbconvert-6.0.7/setup.py +=================================================================== +--- nbconvert-6.0.7.orig/setup.py ++++ nbconvert-6.0.7/setup.py +@@ -212,7 +212,6 @@ setup_args = dict( + ) + + setup_args['install_requires'] = [ +- 'mistune>=0.8.1,<2', + 'jinja2>=2.4', + 'pygments>=2.4.1', + 'jupyterlab_pygments', diff --git a/nbconvert.pdf b/nbconvert.pdf index 7e2f806..23f696b 100644 --- a/nbconvert.pdf +++ b/nbconvert.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:416d49e6d1dc1caf39bb8602e705ee3cae46fde88be0bd5686b26e3b8d9f59c6 -size 643265 +oid sha256:720196ba36473e3fa6bcbb79b1463640730e0e007acb07aba73cfd9adacae0de +size 548761 diff --git a/nbconvert.zip b/nbconvert.zip index 36ef5b1..1b74f30 100644 --- a/nbconvert.zip +++ b/nbconvert.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e880a151f358d2ce4e9a8a6d234043e108ad38288d12dba4e54e4c6e7e5fd2a -size 4707510 +oid sha256:fbc32a1803eabb59acee50b81e705fe11c285ff42b7a99e7d4c68b3bc0bd1507 +size 8652426 diff --git a/python-nbconvert.changes b/python-nbconvert.changes index 380416f..be14e2c 100644 --- a/python-nbconvert.changes +++ b/python-nbconvert.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Dec 31 16:28:25 UTC 2021 - Ben Greiner + +- Revert to 6.0.7 + * We can't have a newer version without traitlets 5. But we + can't have traitlets 5 as long as python36 is active +- Vendorize mistune 0.8.4 + * Add nbconvert-vendorize-mistune.patch + * gh#jupyter/nbconvert#1685 +- Alternativize flavored entry-point. For 6.3: do it with dejavu + ------------------------------------------------------------------- Thu Dec 30 18:01:32 UTC 2021 - Matej Cepl diff --git a/python-nbconvert.spec b/python-nbconvert.spec index 7d8dca3..9ede567 100644 --- a/python-nbconvert.spec +++ b/python-nbconvert.spec @@ -1,5 +1,5 @@ # -# spec file +# spec file for package python-nbconvert # # Copyright (c) 2021 SUSE LLC # @@ -28,9 +28,9 @@ # Note: only update to > 6.0 when there is no python36 Jupyter stack anymore %{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 -%define doc_ver 6.3.0 +%define doc_ver 6.0.7 Name: python-nbconvert%{psuffix} -Version: 6.3.0 +Version: 6.0.7 Release: 0 Summary: Conversion of Jupyter Notebooks License: BSD-3-Clause @@ -38,6 +38,10 @@ URL: https://github.com/jupyter/nbconvert Source0: https://files.pythonhosted.org/packages/source/n/nbconvert/nbconvert-%{version}.tar.gz Source1: https://media.readthedocs.org/pdf/nbconvert/%{doc_ver}/nbconvert.pdf Source2: https://media.readthedocs.org/htmlzip/nbconvert/%{doc_ver}/nbconvert.zip +# License Source3: BSD-3-Clause +Source3: https://files.pythonhosted.org/packages/source/m/mistune/mistune-0.8.4.tar.gz +# PATCH-FIX-OPENSUSE nbconvert-vendorize-mistune.patch -- gh#jupyter/nbconvert#1685 +Patch1: nbconvert-vendorize-mistune.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -57,6 +61,13 @@ Requires: python-nbformat >= 4.4 Requires: python-pandocfilters >= 1.4.1 Requires: python-testpath Requires: python-traitlets >= 4.2 +%if %{with libalternatives} +Requires: alts +BuildRequires: alts +%else +Requires(post): update-alternatives +Requires(postun):update-alternatives +%endif Recommends: pandoc Recommends: python-tornado >= 4.0 Suggests: %{name}-latex @@ -137,9 +148,12 @@ Obsoletes: %{python_module jupyter_nbconvert-doc < %{version}} Documentation and help files for Jupyter's notebook converter. %prep -%autosetup -p1 -n nbconvert-%{version} +%autosetup -p1 -n nbconvert-%{version} -b3 cp %{SOURCE1} . +mkdir nbconvert/vendor +touch nbconvert/vendor/__init__.py +cp ../mistune-0.8.4/mistune.py nbconvert/vendor/ unzip %{SOURCE2} -d docs mv docs/nbconvert-* docs/html rm docs/html/.buildinfo @@ -156,6 +170,8 @@ sed -i -e "/nbclient/ s/,<.*'/'/" setup.py %if ! %{with test} %python_install +%python_clone -a %{buildroot}%{_bindir}/jupyter-nbconvert + mkdir -p %{buildroot}%{_docdir}/jupyter-nbconvert cp %{SOURCE1} %{buildroot}%{_docdir}/jupyter-nbconvert/ @@ -171,22 +187,31 @@ pushd docs export LANG=en_US.UTF-8 %{python_expand # installed package in :test flavor $python -B -m ipykernel.kernelspec --user -pytest-%{$python_bin_suffix} -v -k 'not test_webpdf' --pyargs nbconvert +# not test_webpdf: no pyppeteer, not even offline +pytest-%{$python_bin_suffix} -v -m 'not network' -k "not test_webpdf" --pyargs nbconvert } popd %endif -%if ! %{with test} +%if !%{with test} +%pre +%python_libalternatives_reset_alternative jupyter-nbconvert + +%post +%python_install_alternative jupyter-nbconvert + +%postun +%python_uninstall_alternative jupyter-nbconvert + %files %{python_files} %license LICENSE %doc README.md %{python_sitelib}/nbconvert-%{version}-py*.egg-info %{python_sitelib}/nbconvert/ +%python_alternative %{_bindir}/jupyter-nbconvert %files -n jupyter-nbconvert %license LICENSE -%{_bindir}/jupyter-nbconvert -%{_bindir}/jupyter-dejavu %dir %{_datadir}/jupyter/ %dir %{_datadir}/jupyter/nbconvert %{_datadir}/jupyter/nbconvert/templates