From 9daeb0b005de1e2dc659bb494d1a4f62c9a42e6ddfc7009305258a6cb04a22b7 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 20 Sep 2021 04:34:03 +0000 Subject: [PATCH] - Update to 0.6.7: * switch from nose to pytest * remove nose from appveyor.yml * drop python 3.3 * Adding support for itunes:type tag * urllib.request used over urllib for import * Use raw strings in regexps * Fix parsing cover URL on a new line * Support media:content tags under media:group * Get generator tag from RSS v2 * Add testing on python 3.6 to 3.9, and remove 3.4 and 3.5. * Use VS2019 for newer versions, and 3.9 support. * Add media:thumbnail tests. - Dropped python-podcastparser-remove-nose.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-podcastparser?expand=0&rev=11 --- podcastparser-0.6.5.tar.gz | 3 - podcastparser-0.6.7.tar.gz | 3 + python-podcastparser-remove-nose.patch | 128 ------------------------- python-podcastparser.changes | 18 ++++ python-podcastparser.spec | 9 +- 5 files changed, 23 insertions(+), 138 deletions(-) delete mode 100644 podcastparser-0.6.5.tar.gz create mode 100644 podcastparser-0.6.7.tar.gz delete mode 100644 python-podcastparser-remove-nose.patch diff --git a/podcastparser-0.6.5.tar.gz b/podcastparser-0.6.5.tar.gz deleted file mode 100644 index f7fc5b1..0000000 --- a/podcastparser-0.6.5.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eb008e490d8789778a4838ff7e313cc4dff58f95ada15e187b814420debdc24c -size 22232 diff --git a/podcastparser-0.6.7.tar.gz b/podcastparser-0.6.7.tar.gz new file mode 100644 index 0000000..1491ecf --- /dev/null +++ b/podcastparser-0.6.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79009cdaaf3926cb737221fdcd5b13adca17658d87b5775650f26a5367dbb2f6 +size 27671 diff --git a/python-podcastparser-remove-nose.patch b/python-podcastparser-remove-nose.patch deleted file mode 100644 index 55375f0..0000000 --- a/python-podcastparser-remove-nose.patch +++ /dev/null @@ -1,128 +0,0 @@ -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 3130688..b5abc95 100644 --- a/python-podcastparser.changes +++ b/python-podcastparser.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Mon Sep 20 04:31:41 UTC 2021 - Steve Kowalik + +- Update to 0.6.7: + * switch from nose to pytest + * remove nose from appveyor.yml + * drop python 3.3 + * Adding support for itunes:type tag + * urllib.request used over urllib for import + * Use raw strings in regexps + * Fix parsing cover URL on a new line + * Support media:content tags under media:group + * Get generator tag from RSS v2 + * Add testing on python 3.6 to 3.9, and remove 3.4 and 3.5. + * Use VS2019 for newer versions, and 3.9 support. + * Add media:thumbnail tests. +- Dropped python-podcastparser-remove-nose.patch + ------------------------------------------------------------------- Wed Jul 15 14:36:39 UTC 2020 - pgajdos@suse.com diff --git a/python-podcastparser.spec b/python-podcastparser.spec index 65b5ce8..3932e99 100644 --- a/python-podcastparser.spec +++ b/python-podcastparser.spec @@ -1,7 +1,7 @@ # # spec file for package python-podcastparser # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,16 +18,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-podcastparser -Version: 0.6.5 +Version: 0.6.7 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} @@ -43,7 +39,6 @@ way of parsing RSS- and Atom-based podcast feeds in Python. %prep %setup -q -n podcastparser-%{version} -%patch0 -p1 %build %python_build