diff --git a/ignore-bleach-deprecation-test.patch b/ignore-bleach-deprecation-test.patch new file mode 100644 index 0000000..97c0a21 --- /dev/null +++ b/ignore-bleach-deprecation-test.patch @@ -0,0 +1,11 @@ +Index: nbconvert-6.5.0/pyproject.toml +=================================================================== +--- nbconvert-6.5.0.orig/pyproject.toml ++++ nbconvert-6.5.0/pyproject.toml +@@ -21,5 +21,5 @@ filterwarnings = [ + "ignore:unclosed =4.7", + "jupyterlab_pygments", + "MarkupSafe>=2.0", +- "mistune>=0.8.1,<2", + "nbclient>=0.5.0", + "nbformat>=5.1", + "packaging", +Index: nbconvert-6.5.0/nbconvert/vendor/mistune.py +=================================================================== +--- nbconvert-6.5.0.orig/nbconvert/vendor/mistune.py ++++ nbconvert-6.5.0/nbconvert/vendor/mistune.py +@@ -432,7 +432,8 @@ class BlockLexer(object): + for i, line in enumerate(cells): + for c, cell in enumerate(line): + # de-escape any pipe inside the cell here +- cells[i][c] = re.sub('\\\\\|', '|', cell) ++ # https://github.com/lepture/mistune/pull/188 ++ cells[i][c] = re.sub(r'\\\|', '|', cell) + + return cells - setup_args['install_requires'] = [ -- 'mistune>=0.8.1,<2', - 'jinja2>=2.4', - 'pygments>=2.4.1', - 'jupyterlab_pygments', diff --git a/python-nbconvert.changes b/python-nbconvert.changes index 8dfd6ff..60a6922 100644 --- a/python-nbconvert.changes +++ b/python-nbconvert.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Sun Jun 5 11:29:55 UTC 2022 - Ben Greiner + +- Update to 6.5.0 + * Drop dependency on testpath. by @anntzer in #1723 + * Apply Autoformatters by @blink1073 in #1746 + * support bleach 5, add packaging and tinycss2 dependencies by + @bollwyvl in #1755 + * update cli example by @leahecole in #1753 +- Refresh nbconvert-vendorize-mistune.patch, include + gh#lepture/mistune#188 for successful import +- Add ignore-bleach-deprecation-test.patch because the test suite + fails with a DeprecationWarning for bleach <5 otherwise. + ------------------------------------------------------------------- Sat Mar 12 04:50:52 UTC 2022 - Arun Persaud diff --git a/python-nbconvert.spec b/python-nbconvert.spec index 35f9fef..23ffb09 100644 --- a/python-nbconvert.spec +++ b/python-nbconvert.spec @@ -32,7 +32,7 @@ %{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 Name: python-nbconvert%{psuffix} -Version: 6.4.4 +Version: 6.5.0 Release: 0 Summary: Conversion of Jupyter Notebooks License: BSD-3-Clause @@ -42,28 +42,33 @@ Source0: https://files.pythonhosted.org/packages/source/n/nbconvert/nbcon 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 +# PATCH-FIX-OPENSUSE ignore-bleach-deprecation-test.patch -- ignore warning that we don't have bleach5 yet +Patch2: ignore-bleach-deprecation-test.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module beautifulsoup4} +BuildRequires: %{python_module packaging} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: unzip Requires: jupyter-nbconvert = %{version} -Requires: python-Jinja2 >= 2.4 +Requires: python-Jinja2 >= 3.0 +Requires: python-MarkupSafe >= 2.0 Requires: python-Pygments >= 2.4.1 Requires: python-beautifulsoup4 Requires: python-bleach Requires: python-defusedxml Requires: python-entrypoints >= 0.2.2 -Requires: python-jupyter-core +Requires: python-jupyter-core >= 4.7 Requires: python-jupyterlab-pygments Requires: python-nbclient >= 0.5 -Requires: python-nbformat >= 4.4 +Requires: python-nbformat >= 5.1 +Requires: python-packaging Requires: python-pandocfilters >= 1.4.1 -Requires: python-testpath +Requires: python-tinycss2 Requires: python-traitlets >= 5.0 Recommends: pandoc -Recommends: python-tornado >= 4.0 +Recommends: python-tornado >= 6.1 Suggests: %{name}-latex Provides: python-jupyter_nbconvert = %{version} Obsoletes: python-jupyter_nbconvert < %{version} @@ -122,16 +127,15 @@ via Jinja templates. This package pulls in the LaTeX dependencies for nbconvert. %prep -%autosetup -p1 -n nbconvert-%{version} -b3 +%setup -q -n nbconvert-%{version} -b3 mkdir nbconvert/vendor touch nbconvert/vendor/__init__.py cp ../mistune-0.8.4/mistune.py nbconvert/vendor/ +%patch1 -p1 sed -i -e '/^#!\//, 1d' nbconvert/nbconvertapp.py sed -i -e '/^#!\//, 1d' nbconvert/filters/filter_links.py - -# Ignore maxversion requirements -sed -i -e "/nbclient/ s/,<.*'/'/" setup.py +%patch2 -p1 %build %python_build @@ -149,14 +153,12 @@ sed -i -e "/nbclient/ s/,<.*'/'/" setup.py %if %{with test} %check -pushd docs export LANG=en_US.UTF-8 %{python_expand # installed package in :test flavor $python -B -m ipykernel.kernelspec --user # 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}