14
0

6 Commits

Author SHA256 Message Date
4ffe7aa6b4 Accepting request 1306905 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1306905
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pyquery?expand=0&rev=27
2025-09-25 16:43:51 +00:00
c9dda52960 Accepting request 1306902 from home:pgajdos:libxml2
- temporarily disable tests that fails because of libxml2 version
  bump to 2.14
  https://github.com/gawel/pyquery/issues/257

OBS-URL: https://build.opensuse.org/request/show/1306902
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyquery?expand=0&rev=52
2025-09-24 11:09:53 +00:00
63d63255dc Accepting request 1284643 from devel:languages:python
- Switch to pyproject macros.

OBS-URL: https://build.opensuse.org/request/show/1284643
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pyquery?expand=0&rev=26
2025-06-11 14:19:13 +00:00
ff03eaed7f - Switch to pyproject macros.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyquery?expand=0&rev=50
2025-06-11 06:21:00 +00:00
3ec6cba154 Accepting request 1224558 from devel:languages:python
Forwarded request #1224459 from 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

OBS-URL: https://build.opensuse.org/request/show/1224558
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pyquery?expand=0&rev=25
2024-11-17 15:39:35 +00:00
029e2af74f 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
2024-11-16 08:48:37 +00:00
5 changed files with 75 additions and 54 deletions

View File

@@ -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):

BIN
pyquery-2.0.0.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
pyquery-2.0.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,3 +1,24 @@
-------------------------------------------------------------------
Wed Sep 24 10:43:53 UTC 2025 - pgajdos@suse.com
- temporarily disable tests that fails because of libxml2 version
bump to 2.14
https://github.com/gawel/pyquery/issues/257
-------------------------------------------------------------------
Wed Jun 11 05:49:31 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Switch to pyproject macros.
-------------------------------------------------------------------
Fri Nov 15 13:38:40 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- 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 <daniel.garcia@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file
# spec file for package python-pyquery
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# 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
@@ -38,7 +38,9 @@ Source: https://files.pythonhosted.org/packages/source/p/pyquery/pyquery
Patch0: make_webtest_optional.patch
BuildRequires: %{python_module cssselect >= 1.2.0}
BuildRequires: %{python_module lxml >= 2.1}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-cssselect >= 1.2.0
@@ -63,11 +65,11 @@ XML and HTML manipulation.
%autosetup -p1 -n pyquery-%{version}
%build
%python_build
%pyproject_wheel
%install
%if !%{with test}
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
@@ -75,7 +77,11 @@ XML and HTML manipulation.
%check
# Disable tests which perform live fetch
# test_selector_html uses XML namespaces, which are broken with libxml2 2.10.4+
%pytest -k 'not (test_get or test_selector_html)' tests
# test_val_for_textarea libxml2-2.14 https://github.com/gawel/pyquery/issues/257
# test_replaceWith libxml2-2.14 https://github.com/gawel/pyquery/issues/257
# test_post libxml2-2.14 https://github.com/gawel/pyquery/issues/257
# test_session libxml2-2.14 https://github.com/gawel/pyquery/issues/257
%pytest -k 'not (test_get or test_selector_html or test_val_for_textarea or test_replaceWith or test_post or test_session)' tests
%endif
%if !%{with test}
@@ -83,7 +89,7 @@ XML and HTML manipulation.
%license LICENSE.txt
%doc CHANGES.rst README.rst
%{python_sitelib}/pyquery/
%{python_sitelib}/pyquery-%{version}*-info
%{python_sitelib}/pyquery-%{version}.dist-info
%endif
%changelog