diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8e39a8d..44d24ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: max-parallel: 4 matrix: platform: [ubuntu-latest, windows-latest] - tox-env: [py38, py39, py310, py311, py312, nolxml, nohtml5lib] + tox-env: [py38, py39, py310, py311, py312, py313, nolxml, nohtml5lib] include: - tox-env: py38 python-version: 3.8 @@ -34,15 +34,18 @@ jobs: - tox-env: py312 python-version: '3.12' continue-on-error: false + - tox-env: py313 + python-version: '3.13' + continue-on-error: false - tox-env: nolxml python-version: '3.11' continue-on-error: false - tox-env: nohtml5lib - python-version: '3.10' + python-version: '3.11' continue-on-error: false - # exclude: - # - platform: windows-latest - # tox-env: py311 + exclude: + - platform: windows-latest + tox-env: py313 env: TOXENV: ${{ matrix.tox-env }} @@ -50,18 +53,12 @@ jobs: runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - if: "!endsWith(matrix.python-version, '-dev')" - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} allow-prereleases: true - - name: Set up development Python ${{ matrix.python-version }} - if: endsWith(matrix.python-version, '-dev') - uses: deadsnakes/action@v2.1.1 - with: - python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip setuptools build tox coverage @@ -71,7 +68,7 @@ jobs: continue-on-error: ${{ matrix.continue-on-error }} - name: Upload Results if: success() - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: file: ./coverage.xml flags: unittests @@ -90,9 +87,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -114,9 +111,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d47e568..765d54a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,11 +16,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -40,8 +40,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: 3.11 - name: Package diff --git a/docs/src/markdown/about/changelog.md b/docs/src/markdown/about/changelog.md index c12ed3a..3e584e2 100644 --- a/docs/src/markdown/about/changelog.md +++ b/docs/src/markdown/about/changelog.md @@ -2,6 +2,7 @@ ## 2.6 +- **NEW**: Add official support for Python 3.13. - **NEW**: Add support for `&` as scoping root per the CSS Nesting Module, Level 1. When `&` is used outside the context of nesting, it is treated as the scoping root (equivalent to `:scope`). - **FIX**: Improve error message when an unrecognized pseudo-class is used. diff --git a/hatch_build.py b/hatch_build.py index 7e3a3fa..15d2a44 100644 --- a/hatch_build.py +++ b/hatch_build.py @@ -34,6 +34,7 @@ def update(self, metadata): 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules', 'Typing :: Typed' diff --git a/pyproject.toml b/pyproject.toml index 996c115..75418ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -154,3 +154,8 @@ commands = filterwarnings = ignore:\nCSS selector pattern:UserWarning """ + +[tool.pytest.ini_options] +filterwarnings = [ + "ignore:The 'strip_cdata':DeprecationWarning" +] diff --git a/tests/test_extra/test_soup_contains.py b/tests/test_extra/test_soup_contains.py index 66240db..1f99f82 100644 --- a/tests/test_extra/test_soup_contains.py +++ b/tests/test_extra/test_soup_contains.py @@ -304,6 +304,11 @@ def test_contains_warn(self): ['2'], flags=util.HTML ) + found = False + target = "The pseudo class ':contains' is deprecated, ':-soup-contains' should be used moving forward." + for warn in w: + if target in str(warn.message): + found = True + break # Verify some things - self.assertTrue(len(w) == 1) - self.assertTrue(issubclass(w[-1].category, FutureWarning)) + self.assertTrue(found)