Repository: matthiask/html-sanitizer (language: python)

Issue:
BREAKING CHANGE introduced by dependency `lxml` 5.2.0
Hello there,

The `lxml` dependency recently introduced a breaking change wit new release 5.2.0 (https://github.com/lxml/lxml/releases/tag/lxml-5.2.0)

```
* LP#1958539: The ``lxml.html.clean`` implementation suffered from several (only if used)
  security issues in the past and was now extracted into a separate library:

  https://github.com/fedora-python/lxml_html_clean

  Projects that use lxml without "lxml.html.clean" will not notice any difference,
  except that they won't have potentially vulnerable code installed.
  The module is available as an "extra" setuptools dependency "lxml[html_clean]",
  so that Projects that need "lxml.html.clean" will need to switch their requirements
  from "lxml" to "lxml[html_clean]", or install the new library themselves.
```

As mentionned in the release note, the quick fix would be to install `lxml[html_clean]`.


Discussion / hints:

Fix patch:
diff --git a/pyproject.toml b/pyproject.toml
index bb45f67..4564272 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -35,7 +35,7 @@ dynamic = [
 ]
 dependencies = [
   "beautifulsoup4",
-  "lxml>=4.9.1",
+  "lxml[html_clean]>=5.2.0",
 ]
 [project.urls]
 Homepage = "https://github.com/matthiask/html-sanitizer/"
diff --git a/tox.ini b/tox.ini
index ad5370a..a1ab64d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,7 +1,7 @@
 [testenv]
 deps =
     wheel
-    lxml
+    lxml[html_clean]
     beautifulsoup4
     coverage
 changedir = {toxinidir}


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 08c90f6..4ee9c74 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -22,7 +22,7 @@ jobs:
       - name: Install dependencies
         run: |
           python -m pip install --upgrade pip
-          python -m pip install beautifulsoup4 lxml
+          python -m pip install beautifulsoup4 lxml[html_clean]
           if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
       - name: Run tests
         run: |