17
0

8 Commits

Author SHA256 Message Date
c1143f097f Accepting request 1327360 from devel:languages:python
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1327360
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-soupsieve?expand=0&rev=25
2026-01-15 15:43:29 +00:00
ecd10ce602 add bugzilla entry for future SLFO updates
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-soupsieve?expand=0&rev=48
2026-01-08 11:00:07 +00:00
418190a2d6 Accepting request 1324675 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1324675
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-soupsieve?expand=0&rev=24
2025-12-29 14:15:52 +00:00
ec63064cf1 - Update to 2.8.1
* FIX: Changes in tests to accommodate latest Python HTML parser changes.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-soupsieve?expand=0&rev=46
2025-12-29 10:17:58 +00:00
0334e33349 Accepting request 1307339 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1307339
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-soupsieve?expand=0&rev=23
2025-09-26 20:23:58 +00:00
25ccac5b24 - Update to 2.8
* Drop support for Python 3.8.
  * Add support for Python 3.14.
  * Deploy with PyPI's "Trusted Publisher".

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-soupsieve?expand=0&rev=44
2025-09-26 09:32:25 +00:00
9e1fbd6976 Accepting request 1293327 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1293327
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-soupsieve?expand=0&rev=22
2025-07-17 15:17:29 +00:00
83e42375ae - Update to 2.7
* Add :open pseudo selector.
  * Add :muted pseudo selector.
  * Recognize the following pseudo selectors: :autofill, :buffering,
    :fullscreen, :picture-in-picture, :popover-open, :seeking, :stalled,
    and :volume-locked. These selectors, while recognized, will not
    match any element as they require a live environment to check
    element states and browser states. This just prevents Soup Sieve
    from failing when any of these selectors are specified.
  * A number of existing pseudo-classes are no longer noted as experimental.
  * Typing fixes.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-soupsieve?expand=0&rev=42
2025-07-15 08:56:12 +00:00
5 changed files with 32 additions and 206 deletions

View File

@@ -1,195 +0,0 @@
From 046ce54956a0c30120038561e53b40994d29de2c Mon Sep 17 00:00:00 2001
From: Isaac Muse <faceless.shop@gmail.com>
Date: Wed, 17 Dec 2025 19:33:55 -0700
Subject: [PATCH] Adjustments for changes in HTML parser (#285)
Fixes #284
---
docs/src/markdown/about/changelog.md | 4 ++++
soupsieve/__meta__.py | 2 +-
soupsieve/css_match.py | 4 ++--
tests/test_extra/test_soup_contains.py | 5 ++++-
tests/test_level2/test_lang.py | 5 ++++-
tests/test_level3/test_root.py | 12 ++++++++----
tests/test_level4/test_default.py | 5 ++++-
tests/test_level4/test_dir.py | 5 ++++-
tests/test_level4/test_indeterminate.py | 5 ++++-
9 files changed, 35 insertions(+), 12 deletions(-)
Index: soupsieve-2.6/soupsieve/css_match.py
===================================================================
--- soupsieve-2.6.orig/soupsieve/css_match.py
+++ soupsieve-2.6/soupsieve/css_match.py
@@ -1190,7 +1190,7 @@ class CSSMatch(_DocumentNav):
# Use cached meta language.
if found_lang is None and self.cached_meta_lang:
for cache in self.cached_meta_lang:
- if root is cache[0]:
+ if root is not None and cast(str, root) is cache[0]:
found_lang = cache[1]
# If we couldn't find a language, and the document is HTML, look to meta to determine language.
Index: soupsieve-2.6/tests/test_extra/test_soup_contains.py
===================================================================
--- soupsieve-2.6.orig/tests/test_extra/test_soup_contains.py
+++ soupsieve-2.6/tests/test_extra/test_soup_contains.py
@@ -2,6 +2,9 @@
from .. import util
import warnings
import soupsieve as sv
+from bs4 import BeautifulSoup
+
+IFRAME_TEXT = BeautifulSoup('<iframe><div></div></iframe>', 'html.parser').iframe.text == '<div></div>'
class TestSoupContains(util.TestCase):
@@ -250,7 +253,7 @@ class TestSoupContains(util.TestCase):
self.assert_selector(
markup,
'span:-soup-contains("iframe")',
- ['2'],
+ [] if IFRAME_TEXT else ['2'],
flags=util.PYHTML
)
Index: soupsieve-2.6/tests/test_level2/test_lang.py
===================================================================
--- soupsieve-2.6.orig/tests/test_level2/test_lang.py
+++ soupsieve-2.6/tests/test_level2/test_lang.py
@@ -1,5 +1,8 @@
"""Test language selector."""
from .. import util
+from bs4 import BeautifulSoup
+
+IFRAME_TEXT = BeautifulSoup('<iframe><div></div></iframe>', 'html.parser').iframe.text == '<div></div>'
class TestLang(util.TestCase):
@@ -58,7 +61,7 @@ class TestLang(util.TestCase):
self.assert_selector(
markup,
"p:lang(en)",
- ['3'],
+ [] if IFRAME_TEXT else ['3'],
flags=util.PYHTML
)
Index: soupsieve-2.6/tests/test_level3/test_root.py
===================================================================
--- soupsieve-2.6.orig/tests/test_level3/test_root.py
+++ soupsieve-2.6/tests/test_level3/test_root.py
@@ -1,6 +1,10 @@
"""Test root selectors."""
from .. import util
import soupsieve as sv
+from bs4 import BeautifulSoup
+import pytest
+
+IFRAME_TEXT = BeautifulSoup('<iframe><div></div></iframe>', 'html.parser').iframe.text == '<div></div>'
class TestRoot(util.TestCase):
@@ -65,7 +69,7 @@ class TestRoot(util.TestCase):
self.assert_selector(
self.MARKUP_IFRAME,
":root",
- ["root", "root2"],
+ ["root"] if IFRAME_TEXT else ["root", "root2"],
flags=util.PYHTML
)
@@ -85,17 +89,18 @@ class TestRoot(util.TestCase):
self.assert_selector(
self.MARKUP_IFRAME,
":root div",
- ["div", "div2", "other-div"],
+ ["div", "other-div"] if IFRAME_TEXT else ["div", "div2", "other-div"],
flags=util.PYHTML
)
self.assert_selector(
self.MARKUP_IFRAME,
":root > body > div",
- ["div", "div2", "other-div"],
+ ["div", "other-div"] if IFRAME_TEXT else ["div", "div2", "other-div"],
flags=util.PYHTML
)
+ @pytest.mark.skipif(IFRAME_TEXT, reason="Requires old Python HTML handling")
def test_iframe(self):
"""
Test that we only count `iframe` as root since the scoped element is the root.
@@ -112,7 +117,6 @@ class TestRoot(util.TestCase):
ids = [el['id'] for el in sv.select(':root > body > div', soup.iframe.html)]
self.assertEqual(sorted(ids), sorted(['div2']))
-
def test_no_root_double_tag(self):
"""Test when there is no root due to double root tags."""
Index: soupsieve-2.6/tests/test_level4/test_default.py
===================================================================
--- soupsieve-2.6.orig/tests/test_level4/test_default.py
+++ soupsieve-2.6/tests/test_level4/test_default.py
@@ -1,5 +1,8 @@
"""Test default selectors."""
from .. import util
+from bs4 import BeautifulSoup
+
+IFRAME_TEXT = BeautifulSoup('<iframe><div></div></iframe>', 'html.parser').iframe.text == '<div></div>'
class TestDefault(util.TestCase):
@@ -113,7 +116,7 @@ class TestDefault(util.TestCase):
self.assert_selector(
markup,
":default",
- ['d1', 'd3', 'd4'],
+ ['d1', 'd3'] if IFRAME_TEXT else ['d1', 'd3', 'd4'],
flags=util.PYHTML
)
Index: soupsieve-2.6/tests/test_level4/test_dir.py
===================================================================
--- soupsieve-2.6.orig/tests/test_level4/test_dir.py
+++ soupsieve-2.6/tests/test_level4/test_dir.py
@@ -1,6 +1,9 @@
"""Test direction selectors."""
from .. import util
import soupsieve as sv
+from bs4 import BeautifulSoup
+
+IFRAME_TEXT = BeautifulSoup('<iframe><div></div></iframe>', 'html.parser').iframe.text == '<div></div>'
class TestDir(util.TestCase):
@@ -169,7 +172,7 @@ class TestDir(util.TestCase):
self.assert_selector(
markup,
"div:dir(rtl)",
- ['2'],
+ [] if IFRAME_TEXT else ['2'],
flags=util.PYHTML
)
Index: soupsieve-2.6/tests/test_level4/test_indeterminate.py
===================================================================
--- soupsieve-2.6.orig/tests/test_level4/test_indeterminate.py
+++ soupsieve-2.6/tests/test_level4/test_indeterminate.py
@@ -1,5 +1,8 @@
"""Test indeterminate selectors."""
from .. import util
+from bs4 import BeautifulSoup
+
+IFRAME_TEXT = BeautifulSoup('<iframe><div></div></iframe>', 'html.parser').iframe.text == '<div></div>'
class TestIndeterminate(util.TestCase):
@@ -68,6 +71,6 @@ class TestIndeterminate(util.TestCase):
self.assert_selector(
markup,
":indeterminate",
- ['radio1', 'radio3'],
+ ['radio1'] if IFRAME_TEXT else ['radio1', 'radio3'],
flags=util.PYHTML
)

View File

@@ -1,8 +1,31 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jan 8 10:56:59 UTC 2026 - Markéta Machová <mmachova@suse.com> Mon Dec 29 10:10:20 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Add upstream htmlparser.patch to adjust for changes in CPython - Update to 2.8.1 (bsc#1256316)
(bsc#1256316) * FIX: Changes in tests to accommodate latest Python HTML parser changes.
-------------------------------------------------------------------
Fri Sep 26 08:45:00 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 2.8
* Drop support for Python 3.8.
* Add support for Python 3.14.
* Deploy with PyPI's "Trusted Publisher".
-------------------------------------------------------------------
Mon Jul 14 10:39:01 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 2.7
* Add :open pseudo selector.
* Add :muted pseudo selector.
* Recognize the following pseudo selectors: :autofill, :buffering,
:fullscreen, :picture-in-picture, :popover-open, :seeking, :stalled,
and :volume-locked. These selectors, while recognized, will not
match any element as they require a live environment to check
element states and browser states. This just prevents Soup Sieve
from failing when any of these selectors are specified.
* A number of existing pseudo-classes are no longer noted as experimental.
* Typing fixes.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Oct 30 19:49:47 UTC 2024 - Dirk Müller <dmueller@suse.com> Wed Oct 30 19:49:47 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-soupsieve # spec file for package python-soupsieve
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2025 SUSE LLC and contributors
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -26,15 +26,13 @@
%endif %endif
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-soupsieve%{psuffix} Name: python-soupsieve%{psuffix}
Version: 2.6 Version: 2.8.1
Release: 0 Release: 0
Summary: A modern CSS selector implementation for BeautifulSoup Summary: A modern CSS selector implementation for BeautifulSoup
License: MIT License: MIT
Group: Development/Libraries/Python Group: Development/Libraries/Python
URL: https://github.com/facelessuser/soupsieve URL: https://github.com/facelessuser/soupsieve
Source: https://files.pythonhosted.org/packages/source/s/soupsieve/soupsieve-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/s/soupsieve/soupsieve-%{version}.tar.gz
# PATCH-FIX-UPSTREAM https://github.com/facelessuser/soupsieve/pull/285 Adjustments for changes in HTML parser
Patch0: htmlparser.patch
BuildRequires: %{python_module hatchling} BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip} BuildRequires: %{python_module pip}
BuildRequires: %{python_module wheel} BuildRequires: %{python_module wheel}
@@ -52,7 +50,7 @@ Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4.
It aims to provide selecting, matching, and filtering using modern CSS selectors. It aims to provide selecting, matching, and filtering using modern CSS selectors.
%prep %prep
%autosetup -p1 -n soupsieve-%{version} %setup -q -n soupsieve-%{version}
%build %build
%pyproject_wheel %pyproject_wheel

Binary file not shown.

3
soupsieve-2.8.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4cf733bc50fa805f5df4b8ef4740fc0e0fa6218cf3006269afd3f9d6d80fd350
size 117856