From 03f316a39a02cddd029f54fcb164a2fa23669b8478f5dda3c0de3da9cef25883 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 16 Nov 2024 08:48:37 +0000 Subject: [PATCH] Accepting request 1224459 from home:glaubitz:branches:devel:languages:python - Update to 2.0.1 * Breaking change: its seems no longer possible to use the html parser with a xml file so its no longer tested * Drop support for python 3.7 - Refresh make_webtest_optional.patch OBS-URL: https://build.opensuse.org/request/show/1224459 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyquery?expand=0&rev=48 --- make_webtest_optional.patch | 82 +++++++++++++++++-------------------- pyquery-2.0.0.tar.gz | 3 -- pyquery-2.0.1.tar.gz | 3 ++ python-pyquery.changes | 9 ++++ python-pyquery.spec | 6 +-- 5 files changed, 53 insertions(+), 50 deletions(-) delete mode 100644 pyquery-2.0.0.tar.gz create mode 100644 pyquery-2.0.1.tar.gz diff --git a/make_webtest_optional.patch b/make_webtest_optional.patch index cd0567d..b062add 100644 --- a/make_webtest_optional.patch +++ b/make_webtest_optional.patch @@ -1,47 +1,6 @@ ---- - tests/test_pyquery.py | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -Index: pyquery-2.0.0/tests/test_pyquery.py -=================================================================== ---- pyquery-2.0.0.orig/tests/test_pyquery.py -+++ pyquery-2.0.0/tests/test_pyquery.py -@@ -7,9 +7,12 @@ import time - from lxml import etree - from pyquery.pyquery import PyQuery as pq, no_default - from pyquery.openers import HAS_REQUEST --from webtest import http --from webtest.debugapp import debug_app --from unittest import TestCase -+from unittest import TestCase, skipIf -+try: -+ from webtest import http -+ from webtest.debugapp import debug_app -+except (ImportError, ModuleNotFoundError): -+ http = None - - sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) - -@@ -894,6 +897,7 @@ class TestXMLNamespace(TestCase): - self.assertEqual(repr(val), repr('b')) - - -+@skipIf(http is None, "Cannot test without WebTest") - class TestWebScrapping(TestCase): - - def setUp(self): -@@ -938,6 +942,7 @@ class TestWebScrappingEncoding(TestCase) - self.assertEqual(d('#pt-login').text(), u'Войти') - - -+@skipIf(http is None, "Cannot test without WebTest") - class TestWebScrappingTimeouts(TestCase): - - def setUp(self): -Index: pyquery-2.0.0/conftest.py -=================================================================== ---- pyquery-2.0.0.orig/conftest.py -+++ pyquery-2.0.0/conftest.py +diff -Nru pyquery-2.0.1.orig/conftest.py pyquery-2.0.1/conftest.py +--- pyquery-2.0.1.orig/conftest.py 2024-08-30 10:12:19.000000000 +0200 ++++ pyquery-2.0.1/conftest.py 2024-11-15 14:36:47.617602776 +0100 @@ -1,7 +1,12 @@ import os import pytest @@ -57,3 +16,38 @@ Index: pyquery-2.0.0/conftest.py from urllib.request import urlopen +diff -Nru pyquery-2.0.1.orig/tests/test_pyquery.py pyquery-2.0.1/tests/test_pyquery.py +--- pyquery-2.0.1.orig/tests/test_pyquery.py 2024-08-30 10:12:19.000000000 +0200 ++++ pyquery-2.0.1/tests/test_pyquery.py 2024-11-15 14:36:47.607602471 +0100 +@@ -7,9 +7,12 @@ + from lxml import etree + from pyquery.pyquery import PyQuery as pq, no_default + from pyquery.openers import HAS_REQUEST +-from webtest import http +-from webtest.debugapp import debug_app +-from unittest import TestCase ++from unittest import TestCase, skipIf ++try: ++ from webtest import http ++ from webtest.debugapp import debug_app ++except (ImportError, ModuleNotFoundError): ++ http = None + + sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) + +@@ -888,6 +891,7 @@ + self.assertEqual(repr(val), repr('b')) + + ++@skipIf(http is None, "Cannot test without WebTest") + class TestWebScrapping(TestCase): + + def setUp(self): +@@ -932,6 +936,7 @@ + self.assertEqual(d('#pt-login').text(), 'Войти') + + ++@skipIf(http is None, "Cannot test without WebTest") + class TestWebScrappingTimeouts(TestCase): + + def setUp(self): diff --git a/pyquery-2.0.0.tar.gz b/pyquery-2.0.0.tar.gz deleted file mode 100644 index f132584..0000000 --- a/pyquery-2.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:963e8d4e90262ff6d8dec072ea97285dc374a2f69cad7776f4082abcf6a1d8ae -size 45210 diff --git a/pyquery-2.0.1.tar.gz b/pyquery-2.0.1.tar.gz new file mode 100644 index 0000000..46830d6 --- /dev/null +++ b/pyquery-2.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0194bb2706b12d037db12c51928fe9ebb36b72d9e719565daba5a6c595322faf +size 44999 diff --git a/python-pyquery.changes b/python-pyquery.changes index 7aebd89..65f12c5 100644 --- a/python-pyquery.changes +++ b/python-pyquery.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Nov 15 13:38:40 UTC 2024 - John Paul Adrian Glaubitz + +- Update to 2.0.1 + * Breaking change: its seems no longer possible to use the + html parser with a xml file so its no longer tested + * Drop support for python 3.7 +- Refresh make_webtest_optional.patch + ------------------------------------------------------------------- Mon Apr 24 16:44:07 UTC 2023 - Daniel Garcia diff --git a/python-pyquery.spec b/python-pyquery.spec index 25368a9..b0a73cf 100644 --- a/python-pyquery.spec +++ b/python-pyquery.spec @@ -1,7 +1,7 @@ # -# spec file +# spec file for package python-pyquery # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,7 +27,7 @@ %endif %{?sle15_python_module_pythons} Name: python-pyquery%{psuffix} -Version: 2.0.0 +Version: 2.0.1 Release: 0 Summary: A jQuery-like library for python License: BSD-3-Clause