commit dcea4c70d792ca53028a94095cc452562a6acdce51be59152c9891fa4aa7a639 Author: Adrian Schröter Date: Fri May 3 22:15:26 2024 +0200 Sync from SUSE:SLFO:Main python-pyquery revision 31e41f8c93ca722e0ca0a9a66b978683 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/make_webtest_optional.patch b/make_webtest_optional.patch new file mode 100644 index 0000000..cd0567d --- /dev/null +++ b/make_webtest_optional.patch @@ -0,0 +1,59 @@ +--- + 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 +@@ -1,7 +1,12 @@ + import os + import pytest +-from webtest import http +-from webtest.debugapp import debug_app ++ ++try: ++ from webtest import http ++ from webtest.debugapp import debug_app ++except (ImportError, ModuleNotFoundError): ++ http = None ++ + from urllib.request import urlopen + + diff --git a/pyquery-2.0.0.tar.gz b/pyquery-2.0.0.tar.gz new file mode 100644 index 0000000..f132584 --- /dev/null +++ b/pyquery-2.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:963e8d4e90262ff6d8dec072ea97285dc374a2f69cad7776f4082abcf6a1d8ae +size 45210 diff --git a/python-pyquery.changes b/python-pyquery.changes new file mode 100644 index 0000000..7aebd89 --- /dev/null +++ b/python-pyquery.changes @@ -0,0 +1,268 @@ +------------------------------------------------------------------- +Mon Apr 24 16:44:07 UTC 2023 - Daniel Garcia + +- Update make_webtest_optional.patch to make the import optional in + conftest.py + +------------------------------------------------------------------- +Fri Apr 21 12:31:13 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 20 07:27:05 UTC 2023 - Steve Kowalik + +- Update to 2.0.0: + * Breaking change: inputs starting with "http://" or "https://" like + PyQuery("http://example.com") will no longer fetch the contents of the + URL. Users desiring the old behavior should switch to + PyQuery(url="http://example.com"). + * Add nextUntil method + * .remove() no longer inserts a space in place of the removed element + * Fix escaping of top-level element text in .html() output + * Support (and require) cssselect 1.2+ + * Drop support for python 3.5/3.6 + +------------------------------------------------------------------- +Thu Apr 13 22:43:53 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Fri Feb 17 16:46:13 UTC 2023 - Matej Cepl + +- Add make_webtest_optional.patch to allow testing without + WebTest module. + +------------------------------------------------------------------- +Fri Aug 19 11:41:24 UTC 2022 - Ben Greiner + +- Remove coverage from build requirements -- not relevant for rpm + package + +------------------------------------------------------------------- +Wed Mar 30 08:07:39 UTC 2022 - Dirk Müller + +- update to 1.4.3: + * No longer use a universal wheel + * Fix exception raised when calling `PyQuery("").text()` + * python2 is no longer supported + +------------------------------------------------------------------- +Sun Aug 16 16:39:56 UTC 2020 - John Vandenberg + +- Replace nose with pytest + +------------------------------------------------------------------- +Sun Nov 24 17:21:55 UTC 2019 - Arun Persaud + +- specfile: + * be more specific in %files section + +- update to version 1.4.1: + * This is the latest release with py2 support + * Remove py33, py34 support + * web scraping improvements: default timeout and session support + * Add API methods to serialize form-related elements according to + spec + * Include HTML markup when querying textarea text/value + +------------------------------------------------------------------- +Mon Feb 25 09:00:58 UTC 2019 - Tomáš Chvátal + +- Use _multibuild to run tests + +------------------------------------------------------------------- +Mon Feb 25 03:24:33 UTC 2019 - John Vandenberg + +- Add %license +- Run test suite on both Python 2 & 3 +- Remove outdated build dependencies +- Add minimum versions +- Add python-coverage as build dependency as nose segfaults when missing + +------------------------------------------------------------------- +Tue Dec 4 12:52:42 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Mon Aug 13 13:18:38 UTC 2018 - mcepl@suse.com + +- Remove dependency on unittest2 + +------------------------------------------------------------------- +Wed Mar 29 07:12:38 UTC 2017 - alarrosa@suse.com + +- Converted to singlespec + +------------------------------------------------------------------- +Tue Oct 25 17:14:25 UTC 2016 - arun@gmx.de + +- update to version 1.2.17: + * PyQuery('').val() is '' + * PyQuery('').val() is '' + +- changes from version 1.2.16: + * .attr('value', '') no longer removes the value attribute + * without value="..." have a .val() of 'on' + * without value="..." have a .val() of 'on' + *