Repository: miso-belica/jusText (language: python)

Issue:
Broken import with lxml >= 5.2.0
The newest version of LXML breaks the current code due to changes in `lxml.html.clean` (see also #46).


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/publish-to-pypi.yaml b/.github/workflows/publish-to-pypi.yaml
index 7b6279c..ebc23f6 100644
--- a/.github/workflows/publish-to-pypi.yaml
+++ b/.github/workflows/publish-to-pypi.yaml
@@ -8,10 +8,10 @@ jobs:
   deploy:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v1
+      - uses: actions/checkout@v4
 
       - name: Set up Python
-        uses: actions/setup-python@v1
+        uses: actions/setup-python@v5
         with:
           python-version: '3.x'
 
diff --git a/setup.py b/setup.py
index dab723d..63a92db 100644
--- a/setup.py
+++ b/setup.py
@@ -31,7 +31,7 @@
     url="https://github.com/miso-belica/jusText",
     license="The BSD 2-Clause License",
     install_requires=[
-        'lxml >= 4.4.2',
+        'lxml[html_clean] >= 4.4.2',
         'backports.functools-lru-cache; python_version < "3.2"'
     ],
     tests_require=[


Test patch:
diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml
index f596a9e..921de24 100644
--- a/.github/workflows/run-tests.yml
+++ b/.github/workflows/run-tests.yml
@@ -11,12 +11,12 @@ jobs:
     timeout-minutes: 15
     strategy:
       matrix:
-        python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
+        python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v4
 
       - name: Set up Python ${{ matrix.python-version }}
-        uses: actions/setup-python@v2
+        uses: actions/setup-python@v5
         with:
           python-version: ${{ matrix.python-version }}
 
@@ -24,13 +24,13 @@ jobs:
         run: |
           python -m pip install --upgrade pip
           # pytest 4.6.X works best for older Python versions
-          pip install -U lxml "pytest==4.6.9" codecov 'coverage==4.5.4' pytest-cov
+          pip install -U "lxml[html_clean]" "pytest==4.6.9" codecov 'coverage==4.5.4' pytest-cov
         if: ${{ matrix.python-version == '2.7' }}
 
       - name: "Install dependencies (up to date)"
         run: |
           python -m pip install --upgrade pip
-          pip install -U lxml pytest codecov coverage pytest-cov
+          pip install -U "lxml[html_clean]" pytest codecov coverage pytest-cov
         if: ${{ matrix.python-version != '2.7' }}
 
       - run: py.test tests