1
0

5 Commits

Author SHA256 Message Date
8076d806c7 Accepting request 1286540 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1286540
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-beautifulsoup4?expand=0&rev=42
2025-06-18 20:28:40 +00:00
e0fde13fec - Skip failing test test_rejected_input, it is known to be flaky
and dependent on the various changes in Python (which there
  will be more coming in few days).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-beautifulsoup4?expand=0&rev=98
2025-06-18 07:07:05 +00:00
89dfc2f1db Accepting request 1220019 from devel:languages:python
- Add soupsieve26-compat.patch to make tests more tolerant with
  various versions of soupsieve (better solution for lp#2086199).
- Skip the test test_unsupported_pseudoclass (lp#2086199).

OBS-URL: https://build.opensuse.org/request/show/1220019
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-beautifulsoup4?expand=0&rev=41
2024-11-06 15:49:29 +00:00
9b0a4c4b8c - Add soupsieve26-compat.patch to make tests more tolerant with
various versions of soupsieve (better solution for lp#2086199).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-beautifulsoup4?expand=0&rev=96
2024-11-01 07:23:51 +00:00
1c3cfc65ef - Skip the test test_unsupported_pseudoclass (lp#2086199).
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-beautifulsoup4?expand=0&rev=95
2024-10-31 14:24:28 +00:00
3 changed files with 42 additions and 3 deletions

View File

@@ -1,3 +1,21 @@
-------------------------------------------------------------------
Wed Jun 18 07:05:52 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
- Skip failing test test_rejected_input, it is known to be flaky
and dependent on the various changes in Python (which there
will be more coming in few days).
-------------------------------------------------------------------
Fri Nov 1 07:22:57 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Add soupsieve26-compat.patch to make tests more tolerant with
various versions of soupsieve (better solution for lp#2086199).
-------------------------------------------------------------------
Thu Oct 31 14:24:07 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Skip the test test_unsupported_pseudoclass (lp#2086199).
-------------------------------------------------------------------
Sat Jan 20 13:11:41 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-beautifulsoup4
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,6 +24,9 @@ Summary: HTML/XML Parser for Quick-Turnaround Applications Like Screen-Sc
License: MIT
URL: https://www.crummy.com/software/BeautifulSoup/
Source: https://files.pythonhosted.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version}.tar.gz
# PATCH-FIX-UPSTREAM soupsieve26-compat.patch lp#2086199 mcepl@suse.com
# compatibility patch for various versions of soupsieve
Patch0: soupsieve26-compat.patch
BuildRequires: %{python_module cchardet}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
@@ -37,6 +40,7 @@ Requires: python-cchardet
Requires: python-soupsieve >= 1.2
Suggests: python-html5lib
Suggests: python-lxml >= 3.4.4
Provides: python-bs4 = %{version}-%{release}
BuildArch: noarch
%python_subpackages
@@ -79,7 +83,7 @@ Documentation and help files for %{name}
%endif
%prep
%setup -q -n beautifulsoup4-%{version}
%autosetup -p1 -n beautifulsoup4-%{version}
%build
%pyproject_wheel
@@ -92,7 +96,8 @@ pushd doc && make html && rm build/html/.buildinfo build/html/objects.inv && po
%check
export LANG=en_US.UTF-8
export PYTHONDONTWRITEBYTECODE=1
%pytest
donttest="test_rejected_input"
%pytest -k "not ($donttest)"
%files %{python_files}
%license LICENSE

16
soupsieve26-compat.patch Normal file
View File

@@ -0,0 +1,16 @@
---
bs4/tests/test_css.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/bs4/tests/test_css.py
+++ b/bs4/tests/test_css.py
@@ -332,7 +332,8 @@ class TestCSSSelectors(SoupTest):
assert "yes" == chosen.string
def test_unsupported_pseudoclass(self):
- with pytest.raises(NotImplementedError):
+ # Compatibility with various versions of soupsieve
+ with pytest.raises((NotImplementedError,SelectorSyntaxError)):
self.soup.select("a:no-such-pseudoclass")
with pytest.raises(SelectorSyntaxError):