From dd2c25cfcbb5defe5b6d9059a9e57faf0c1c32b54cddee4dac9e462993e2e91c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?=
Date: Wed, 15 Jul 2020 17:47:31 +0000
Subject: [PATCH] Accepting request 821139 from home:pgajdos:python
- version update to 0.6.5
* no upstream changelog
- added patches
fix https://github.com/gpodder/podcastparser/pull/21
+ python-podcastparser-remove-nose.patch
OBS-URL: https://build.opensuse.org/request/show/821139
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-podcastparser?expand=0&rev=9
---
podcastparser-0.6.4.tar.gz | 3 -
podcastparser-0.6.5.tar.gz | 3 +
python-podcastparser-remove-nose.patch | 128 +++++++++++++++++++++++++
python-podcastparser.changes | 9 ++
python-podcastparser.spec | 11 ++-
5 files changed, 148 insertions(+), 6 deletions(-)
delete mode 100644 podcastparser-0.6.4.tar.gz
create mode 100644 podcastparser-0.6.5.tar.gz
create mode 100644 python-podcastparser-remove-nose.patch
diff --git a/podcastparser-0.6.4.tar.gz b/podcastparser-0.6.4.tar.gz
deleted file mode 100644
index 2e8109b..0000000
--- a/podcastparser-0.6.4.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8788bd7be741716a60828b4fceb9fadd445c855e1d5fd80789a5da55d90b52cf
-size 22446
diff --git a/podcastparser-0.6.5.tar.gz b/podcastparser-0.6.5.tar.gz
new file mode 100644
index 0000000..f7fc5b1
--- /dev/null
+++ b/podcastparser-0.6.5.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:eb008e490d8789778a4838ff7e313cc4dff58f95ada15e187b814420debdc24c
+size 22232
diff --git a/python-podcastparser-remove-nose.patch b/python-podcastparser-remove-nose.patch
new file mode 100644
index 0000000..55375f0
--- /dev/null
+++ b/python-podcastparser-remove-nose.patch
@@ -0,0 +1,128 @@
+Index: podcastparser-0.6.5/test_podcastparser.py
+===================================================================
+--- podcastparser-0.6.5.orig/test_podcastparser.py 2020-04-07 22:00:53.000000000 +0200
++++ podcastparser-0.6.5/test_podcastparser.py 2020-07-15 16:18:39.885076713 +0200
+@@ -29,14 +29,14 @@ except ImportError:
+ from io import StringIO
+
+
+-from nose.tools import assert_equal
+-from nose.tools import assert_raises
+-
++import pytest
+ import podcastparser
+
+
+-def test_rss_parsing():
+- def test_parse_rss(rss_filename):
++class TestPodcastparser:
++ # test RSS parsing
++ @pytest.mark.parametrize("rss_filename", glob.glob(os.path.join('tests', 'data', '*.rss')))
++ def test_parse_rss(self, rss_filename):
+ basename, _ = os.path.splitext(rss_filename)
+ json_filename = basename + '.json'
+
+@@ -53,21 +53,16 @@ def test_rss_parsing():
+ parsed = podcastparser.parse('file://' + normalized_rss_filename,
+ open(rss_filename), **params)
+
+- assert_equal.__self__.maxDiff = None
+- assert_equal(expected, parsed)
+-
+- for rss_filename in glob.glob(os.path.join('tests', 'data', '*.rss')):
+- yield test_parse_rss, rss_filename
+-
+-def test_invalid_roots():
+- def test_fail_parse(feed):
+- with assert_raises(podcastparser.FeedParseError):
+- podcastparser.parse('file://example.com/feed.xml', StringIO(feed))
++ assert expected == parsed
+
++ # test invalid roots
+ feeds = [
+ '',
+ '',
+ '',
+ ]
+- for feed in feeds:
+- yield test_fail_parse, feed
++ @pytest.mark.parametrize("feed", feeds)
++ def test_fail_parse(self, feed):
++ with pytest.raises(podcastparser.FeedParseError):
++ podcastparser.parse('file://example.com/feed.xml', StringIO(feed))
++
+Index: podcastparser-0.6.5/README.md
+===================================================================
+--- podcastparser-0.6.5.orig/README.md 2017-10-30 13:12:24.000000000 +0100
++++ podcastparser-0.6.5/README.md 2020-07-15 16:18:39.885076713 +0200
+@@ -7,4 +7,4 @@ easy and reliable way of parsing RSS- an
+
+ ## Automated Tests
+
+-To run the unit tests you need [`nose`](http://nose.readthedocs.io/en/latest/). If you have `nose` installed, use the `nosetests` command in the repository's root directory to run the tests.
++To run the unit tests you need [`pytest`](https://docs.pytest.org/). If you have `pytest` installed, use the `pytest` command in the repository's root directory to run the tests.
+Index: podcastparser-0.6.5/makefile
+===================================================================
+--- podcastparser-0.6.5.orig/makefile 2017-10-30 13:12:24.000000000 +0100
++++ podcastparser-0.6.5/makefile 2020-07-15 16:19:05.461229009 +0200
+@@ -2,7 +2,7 @@ PACKAGE := podcastparser
+
+ PYTHON ?= python
+ FIND ?= find
+-NOSETESTS ?= $(PYTHON) -m nose
++PYTEST ?= $(PYTHON) -m pytest
+
+ help:
+ @echo ""
+@@ -12,7 +12,7 @@ help:
+ @echo ""
+
+ test:
+- $(NOSETESTS)
++ $(PYTEST)
+
+ clean:
+ $(FIND) . -name '*.pyc' -o -name __pycache__ -exec $(RM) -r '{}' +
+Index: podcastparser-0.6.5/requirements-test.txt
+===================================================================
+--- podcastparser-0.6.5.orig/requirements-test.txt 2017-10-30 13:12:24.000000000 +0100
++++ podcastparser-0.6.5/requirements-test.txt 2020-07-15 16:19:27.093357818 +0200
+@@ -1,2 +1,3 @@
+-nose
++pytest
++pytest-cov
+ coverage
+Index: podcastparser-0.6.5/PKG-INFO
+===================================================================
+--- podcastparser-0.6.5.orig/PKG-INFO 2020-04-07 22:02:14.000000000 +0200
++++ podcastparser-0.6.5/PKG-INFO 2020-07-15 16:20:37.889779388 +0200
+@@ -15,6 +15,6 @@ Description: podcastparser: Simple, fast
+
+ ## Automated Tests
+
+- To run the unit tests you need [`nose`](http://nose.readthedocs.io/en/latest/). If you have `nose` installed, use the `nosetests` command in the repository's root directory to run the tests.
++ To run the unit tests you need [`pytest`](http://docs.pytest.org/). If you have `pytest` installed, use the `pytest` command in the repository's root directory to run the tests.
+
+ Platform: UNKNOWN
+Index: podcastparser-0.6.5/pytest.ini
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ podcastparser-0.6.5/pytest.ini 2020-07-15 16:22:39.186501697 +0200
+@@ -0,0 +1,3 @@
++[pytest]
++addopts = --cov=podcastparser --cov-report html --doctest-modules
++
+Index: podcastparser-0.6.5/setup.cfg
+===================================================================
+--- podcastparser-0.6.5.orig/setup.cfg 2017-10-30 13:12:24.000000000 +0100
++++ podcastparser-0.6.5/setup.cfg 2020-07-15 16:21:02.817927825 +0200
+@@ -1,9 +1,3 @@
+-[nosetests]
+-cover-erase = true
+-with-coverage = true
+-cover-package = podcastparser
+-with-doctest = true
+-
+ [pep8]
+ max-line-length = 120
+ exclude = doc/conf.py
diff --git a/python-podcastparser.changes b/python-podcastparser.changes
index bd1b921..3130688 100644
--- a/python-podcastparser.changes
+++ b/python-podcastparser.changes
@@ -1,3 +1,12 @@
+-------------------------------------------------------------------
+Wed Jul 15 14:36:39 UTC 2020 - pgajdos@suse.com
+
+- version update to 0.6.5
+ * no upstream changelog
+- added patches
+ fix https://github.com/gpodder/podcastparser/pull/21
+ + python-podcastparser-remove-nose.patch
+
-------------------------------------------------------------------
Sun Jun 2 19:32:32 UTC 2019 - Jan Engelhardt
diff --git a/python-podcastparser.spec b/python-podcastparser.spec
index 392b90c..65b5ce8 100644
--- a/python-podcastparser.spec
+++ b/python-podcastparser.spec
@@ -1,7 +1,7 @@
#
# spec file for package python-podcastparser
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,14 +18,18 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-podcastparser
-Version: 0.6.4
+Version: 0.6.5
Release: 0
Summary: A podcast parser
License: ISC
Group: Development/Libraries/Python
URL: https://github.com/gpodder/podcastparser
Source: https://files.pythonhosted.org/packages/source/p/podcastparser/podcastparser-%{version}.tar.gz
+# https://github.com/gpodder/podcastparser/pull/21
+Patch0: python-podcastparser-remove-nose.patch
BuildRequires: %{python_module nose}
+BuildRequires: %{python_module pytest-cov}
+BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module xml}
BuildRequires: fdupes
@@ -39,6 +43,7 @@ way of parsing RSS- and Atom-based podcast feeds in Python.
%prep
%setup -q -n podcastparser-%{version}
+%patch0 -p1
%build
%python_build
@@ -48,7 +53,7 @@ way of parsing RSS- and Atom-based podcast feeds in Python.
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-%python_expand nosetests-%{$python_bin_suffix}
+%pytest
%files %{python_files}
%license LICENSE