From 6fc15690161495c1f60e4249d8a6ec6747fd29ee2a8b53bb54597937214dab0b Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Sat, 30 Oct 2021 17:55:53 +0000 Subject: [PATCH] Accepting request 928303 from home:bnavigator:branches:devel:languages:python:jupyter:nbc6 - Do not require webpdf extra pyppeteer on tests. Not usefully used in offline testing, not available for python36. - Drop skip_network_tests.patch (upstreamed for 6.1) not required due to the above - Note: we have to stay on version 6.0 until the whole python36 stack is removed from entire TW or the Jupyter ecosystem on TW. OBS-URL: https://build.opensuse.org/request/show/928303 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-nbconvert?expand=0&rev=27 --- python-nbconvert.changes | 10 +++++++++ python-nbconvert.spec | 10 ++++----- skip_network_tests.patch | 47 ---------------------------------------- 3 files changed, 14 insertions(+), 53 deletions(-) delete mode 100644 skip_network_tests.patch diff --git a/python-nbconvert.changes b/python-nbconvert.changes index 2fb9337..95359b2 100644 --- a/python-nbconvert.changes +++ b/python-nbconvert.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sat Oct 30 17:35:42 UTC 2021 - Ben Greiner + +- Do not require webpdf extra pyppeteer on tests. Not usefully + used in offline testing, not available for python36. +- Drop skip_network_tests.patch (upstreamed for 6.1) not required + due to the above +- Note: we have to stay on version 6.0 until the whole python36 + stack is removed from entire TW or the Jupyter ecosystem on TW. + ------------------------------------------------------------------- Thu Apr 8 22:30:04 UTC 2021 - Ben Greiner diff --git a/python-nbconvert.spec b/python-nbconvert.spec index eabda4f..fa16b19 100644 --- a/python-nbconvert.spec +++ b/python-nbconvert.spec @@ -25,7 +25,9 @@ %bcond_with test %endif -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +# 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 Name: python-nbconvert%{psuffix} Version: 6.0.7 @@ -36,9 +38,6 @@ 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 -# PATCH-FIX-UPSTREAM skip_network_tests.patch gh#jupyter/nbconvert#1526 mcepl@suse.com -# Skip tests requiring network access -Patch0: skip_network_tests.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -82,7 +81,6 @@ BuildRequires: %{python_module nbclient >= 0.5} BuildRequires: %{python_module nbconvert} BuildRequires: %{python_module nbformat >= 4.4} BuildRequires: %{python_module pandocfilters >= 1.4.1} -BuildRequires: %{python_module pyppeteer} BuildRequires: %{python_module pytest} BuildRequires: %{python_module testpath} BuildRequires: %{python_module tornado >= 4.0} @@ -173,7 +171,7 @@ 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 network' --pyargs nbconvert +pytest-%{$python_bin_suffix} -v -k 'not test_webpdf' --pyargs nbconvert } popd %endif diff --git a/skip_network_tests.patch b/skip_network_tests.patch deleted file mode 100644 index 6b8019b..0000000 --- a/skip_network_tests.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- - nbconvert/exporters/tests/test_webpdf.py | 1 + - nbconvert/tests/test_nbconvertapp.py | 5 +++-- - setup.cfg | 4 ++++ - 3 files changed, 8 insertions(+), 2 deletions(-) - ---- a/nbconvert/exporters/tests/test_webpdf.py -+++ b/nbconvert/exporters/tests/test_webpdf.py -@@ -16,6 +16,7 @@ class TestWebPDFExporter(ExportersTestsB - - exporter_class = WebPDFExporter - -+ @pytest.mark.network - def test_export(self): - """ - Can a TemplateExporter export something? ---- a/nbconvert/tests/test_nbconvertapp.py -+++ b/nbconvert/tests/test_nbconvertapp.py -@@ -146,6 +146,7 @@ class TestNbConvertApp(TestsBase): - ) - assert os.path.isfile('notebook with spaces.pdf') - -+ @pytest.mark.network - def test_webpdf_with_chromium(self): - """ - Generate PDFs if chromium allowed to be downloaded? -@@ -356,8 +357,8 @@ class TestNbConvertApp(TestsBase): - text = f.read() - assert 'celltag_mycelltag celltag_mysecondcelltag' in text - assert 'celltag_mymarkdowncelltag' in text -- -- -+ -+ - def test_no_input(self): - """ - Verify that the html has no input when given --no-input. ---- a/setup.cfg -+++ b/setup.cfg -@@ -8,3 +8,7 @@ license_file = LICENSE - ignore = - nbconvert/resources/style.min.css - .circleci/* -+ -+[tool:pytest] -+markers = -+ network: marks tests which require network connection