From 769861f2d2b29466c4f247f59d9ad1f51a6a856f Mon Sep 17 00:00:00 2001 From: Johannes Date: Wed, 18 Feb 2026 12:58:57 +0100 Subject: [PATCH 1/7] add github action config --- .github/workflows/ci.yaml | 77 +++++++++++++++++++++++++++++++++++++++ pyproject.toml | 62 +++++++++++++------------------ 2 files changed, 103 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..26e8ff0 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,77 @@ +name: CI + +on: + push: + branches: [main] + tags: ["v*"] # run on version tags + pull_request: + branches: [main] # run on PRs targeting main + release: + types: [published] # run on Github release + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version: "3.14" + - name: Install dependencies + run: pip install tox + - name: Lint check + run: tox -e lint + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: pip install tox tox-gh-actions + - name: Run tests + run: tox + publish-pypi: + name: Upload release to PyPI + needs: [lint, test] # wait for test and lint to pass + if: github.event_name == 'release' # only on release + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/django-webmention + permissions: + id-token: write # required for trusted publishing + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version: "3.14" + - name: Build package + run: python setup.py sdist bdist_wheel + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + publish-pypi-test: + name: Upload release to test PyPI + needs: [lint, test] # wait for test and lint to pass + if: startsWith(github.ref, 'refs/tags/') # only on tags + runs-on: ubuntu-latest + environment: + name: pypi-test + url: https://test.pypi.org/p/django-webmention + permissions: + id-token: write # required for trusted publishing + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version: "3.14" + - name: Build package + run: python setup.py sdist bdist_wheel + - name: Publish package to test PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ diff --git a/pyproject.toml b/pyproject.toml index debf12f..478aa43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -121,34 +121,16 @@ deps = [ "Django>=4.2,<4.3", ] -[tool.tox.env."py39-django5.0"] -deps = [ - { replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true }, - "Django>=5.0,<5.1", -] - -[tool.tox.env."py39-django5.1"] -deps = [ - { replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true }, - "Django>=5.1,<5.2", -] - [tool.tox.env."py310-django4.2"] deps = [ { replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true }, "Django>=4.2,<4.3", ] -[tool.tox.env."py310-django5.0"] -deps = [ - { replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true }, - "Django>=5.0,<5.1", -] - -[tool.tox.env."py310-django5.1"] +[tool.tox.env."py310-django5.2"] deps = [ { replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true }, - "Django>=5.1,<5.2", + "Django>=5.2,<5.3", ] [tool.tox.env."py311-django4.2"] @@ -157,52 +139,52 @@ deps = [ "Django>=4.2,<4.3", ] -[tool.tox.env."py311-django5.0"] +[tool.tox.env."py311-django5.2"] deps = [ { replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true }, - "Django>=5.0,<5.1", + "Django>=5.2,<5.3", ] -[tool.tox.env."py311-django5.1"] +[tool.tox.env."py312-django4.2"] deps = [ { replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true }, - "Django>=5.1,<5.2", + "Django>=4.2,<4.3", ] -[tool.tox.env."py312-django4.2"] +[tool.tox.env."py312-django5.2"] deps = [ { replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true }, - "Django>=4.2,<4.3", + "Django>=5.2,<5.3", ] -[tool.tox.env."py312-django5.0"] +[tool.tox.env."py312-django6.0"] deps = [ { replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true }, - "Django>=5.0,<5.1", + "Django>=6.0,<6.1", ] -[tool.tox.env."py312-django5.1"] +[tool.tox.env."py313-django5.2"] deps = [ { replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true }, - "Django>=5.1,<5.2", + "Django>=5.2,<5.3", ] -[tool.tox.env."py313-django4.2"] +[tool.tox.env."py313-django6.0"] deps = [ { replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true }, - "Django>=4.2,<4.3", + "Django>=6.0,<6.1", ] -[tool.tox.env."py313-django5.0"] +[tool.tox.env."py314-django5.2"] deps = [ { replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true }, - "Django>=5.0,<5.1", + "Django>=5.2,<5.3", ] -[tool.tox.env."py313-django5.1"] +[tool.tox.env."py314-django6.0"] deps = [ { replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true }, - "Django>=5.1,<5.2", + "Django>=6.0,<6.1", ] [tool.tox.env.lint] @@ -233,3 +215,11 @@ deps = [ commands = [ ["mypy", { replace = "posargs", default = ["src/webmention", "tests"], extend = true }], ] + +[tool.tox-gh-actions] +"3.9" = "py39-django4.2" +"3.10" = "py310-django4.2, py310-django5.2" +"3.11" = "py311-django4.2, py311-django5.2" +"3.12" = "py312-django4.2, py312-django5.2, py312-django6.0" +"3.13" = "py313-django5.2, py313-django6.0" +"3.14" = "py314-django5.2, py314-django6.0" From 3eba0fb79cceac7974d74dca922bc0feb007dca2 Mon Sep 17 00:00:00 2001 From: Johannes Date: Wed, 18 Feb 2026 13:16:30 +0100 Subject: [PATCH 2/7] mypy 9.x requires python >=3.10 --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 478aa43..8f7c75c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ line-length = 120 target-version = ["py39", "py310", "py311", "py312", "py313"] [tool.mypy] -python_version = "3.9" +python_version = "3.10" warn_unused_configs = true show_error_context = true pretty = true @@ -216,7 +216,7 @@ commands = [ ["mypy", { replace = "posargs", default = ["src/webmention", "tests"], extend = true }], ] -[tool.tox-gh-actions] +[tool.tox-gh-actions.python] "3.9" = "py39-django4.2" "3.10" = "py310-django4.2, py310-django5.2" "3.11" = "py311-django4.2, py311-django5.2" From 39424cf851fb8e82907ea856d8a865ba84565f99 Mon Sep 17 00:00:00 2001 From: Johannes Date: Wed, 18 Feb 2026 13:17:32 +0100 Subject: [PATCH 3/7] fix black formatting --- src/webmention/urls.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/webmention/urls.py b/src/webmention/urls.py index 1515e64..10de856 100644 --- a/src/webmention/urls.py +++ b/src/webmention/urls.py @@ -2,7 +2,6 @@ from . import views - app_name = "webmention" From 338a283440d040b64766a628f8f13ba8be63c823 Mon Sep 17 00:00:00 2001 From: Johannes Date: Wed, 18 Feb 2026 13:21:15 +0100 Subject: [PATCH 4/7] remove travis CI config --- .travis.yml | 58 ----------------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1d4d73d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,58 +0,0 @@ -dist: xenial -language: python -cache: pip - -python: - - '3.8' - - '3.7' - - '3.6' - -install: - - pip install tox-travis - -script: - - tox - -stages: - - lint - - test - - name: deploy - if: tag IS present - -jobs: - include: - - stage: lint - script: - - tox -e lint - - - stage: deploy - before_deploy: - python setup.py sdist bdist_wheel - deploy: - - provider: releases # GitHub releases - api_key: - secure: 'ONG/Gqo6zQvLTW2F4wIiu21fgDsBOSVWhuSgmzs98P6brIeSY4IqAYh6MH4d0XszfYOV1ytky3YjyoXbQsBdYBhyS6Psgw8XvJeLN/mRjr3gNmxZ0dEUiJcdnYePRLe7FG+gFB08FS+Aq4d9GqpithmBcHpGSmL6q5ZnnxC98OX/Ts46CrNiBCA6gg8klkOygk1VOJklJwWHK39yRZNuyUpKGk9WEf23BDpLoaqrnivwJODvMDCnGaAjTeeziCZlpGTdR75F6CViJkeqA9dq0cG6zy1i3q6Mf8zEBmmRJxFcrbW2pdDYgKiguGohTsxt2drhDQRTItbgu01pMXDtapX4WO51tEbEr2JjOq7Yv1L1VAyARFdM6E07s+JE5WLCWKxWlFxly0Vc58pRpd7wgP87lvGiPHSHPUVVeic9hzCbxMsl8iVzEO+MldZHHrgU9R0PQNW4LtpN0HGTTIyyu8cbGytfdd/ZoQVzW1cJMxuxBP8c4tj8uGlHQCRmxOy4pHhj3r2kyTLrbaR8VK2aLIMiosqylp1ZIDbmHSsSEYYDSrRsaXqEXXBaozqi/o9vZ0vnPMoHJ7L6FxR2c+1FjaIlmjnSUv6de5a9ytR6xoT8QYF4fbWA/U46yCJL7mboRXXqgqBwxHZNRrivnxBD3sfDSUT0Ykq3fegGGow2lfM=' - file_glob: true - file: - - dist/django-webmention-*-py3-none-any.whl - - dist/django-webmention-*.tar.gz - skip_cleanup: true - on: - tags: true - python: '3.8' - - - &pypi # Production PyPI - provider: pypi - user: '__token__' - password: - secure: 'XXT3GDecB3QDePR5+3OotyUkz6esUmZK5InF4lJQ58SKU1e0R2CxgKivEKDDs88dFtiHdNnKwRknQ4/9WgQ5rhXuEZ/eiwmxue1xfa9284rfX6fAmnY1WCvnIonus82tmhCB6eSkQnRRu03+aLIilI4WYSb1rwkOx8Soa6rtRMbfGJNv8cAeDeHK2uM16WWgDVp+pZOO54r0a/j05SQk4VL/W5c9visFFnWKxZqBTK+C95ZAk1d4BoS+VHiYxzX4dImqSwomC4OZ4Df/lS7p/thabrC4T8n/KXBvI3LiM2u6glFM42rJ6MmFoadLaBwON4+OhInKJ+Pc8yWjKuQ34e07VZ97t3XXxEoSG3hrH0wHyTSx9tca8UwuIFqNP70DV9X8ePbINBCPCLKuJCOa5njUubU3MpXM9nwt71IjWCgZpxXj9mEYH0lPGDcR8kQLLGxxtoFL5oVrEDR6YrPoObuTokXMgXeLrNkcCkEKuzB6fPnH28hvXIshmixFygnz+fio4Z/CcE6A9oCp8hmFOAj+1ZPWJuiRZrQzuGV4S7/G6GHWhdI4S9W54A+3MU6QFhi2oum/IcG55C54eY0p04oFL87LaRhuy1SB7obr2i0871j2LR8tWzQIaaTgNww4cYPLKWnnYGXmiQxtkuwqT1VtCFvI2AufcDdL9x8bJ3U=' - skip_cleanup: true - skip_existing: true - on: - tags: true - python: '3.8' - - - <<: *pypi # Test PyPI - server: 'https://test.pypi.org/legacy/' - password: - secure: 'Wgbk8W2KQfsaXFQBKNAAo7VvwuBIpGboYG+iaf/ImrkjDz1oLOy/P/d7qlEY79SJVdOAK5Orrf6Dp+vlKziiIcIIa+A0qfcLtNlT6nIhrx0h0l+N9/Hsliw1FAd1DhJA1a6qE8z3790ZHB6QXA8FWP2Vqd2iY05l3R3Ii0Rz+701WLENNi1+6iHiTdzLJJtcpvy9snzwdwLHLXJN2FDJbKRN1DJW2GE35OOxrhuZC8x8lUwsJujI1UbN5P16TWxVgNZz6Ob05hOkkRBaMDxXA9deSsk+wDqKoJaD2KWEr9GDzJLFTyw9ZOG3iN5eJ8IN011cXeJ3YneucHEkD+0xFjFF1oRzMkTw6Kga1+/IIzeUG8CeKR6RQ2V+1yI9Ou2qZmc975AlgPCbbfmBtOsoZZWsoQAPXrOyBpLhoiEHuqMglbhQDTz2jS9mgyYW5bXbhJhPrb7CwAtwjH1QpVlC2v0TTgwpGdY0KEhwKogm/cSudCOgKUHfU63AXJoIjAzTmsWbiCbkKrdQ+E7kHLVUxrPVennfueBQ0AXHrSRPkupYSzjeQFI4mE5y3NSxwDFgb3IZj8ingTKokHrO5W0JUBDlZEVlrT1HX0bcbu2V7sM9Iul1ZIWGAigOo+2izQSvxu1YMHvLX8ghjQagkOOFRXWiAzr++aKkqnxhJrgmjFM=' From 47b1288984c94ca03ef0a5b1506147781430c50c Mon Sep 17 00:00:00 2001 From: Johannes Date: Thu, 19 Feb 2026 09:02:52 +0100 Subject: [PATCH 5/7] fixed classifiers and tox python versions --- pyproject.toml | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8f7c75c..a71be6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,9 +10,9 @@ classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Framework :: Django", - "Framework :: Django :: 3.2", - "Framework :: Django :: 4.0", - "Framework :: Django :: 4.1", + "Framework :: Django :: 4.2", + "Framework :: Django :: 5.2", + "Framework :: Django :: 6.0", "Topic :: Internet :: WWW/HTTP :: Indexing/Search", "License :: OSI Approved :: MIT License", "Programming Language :: Python", @@ -23,6 +23,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] dependencies = [ "Django>=4.2.0", @@ -42,7 +43,7 @@ exclude = ["test*"] [tool.black] line-length = 120 -target-version = ["py39", "py310", "py311", "py312", "py313"] +target-version = ["py39", "py310", "py311", "py312", "py313", "py314"] [tool.mypy] python_version = "3.10" @@ -89,20 +90,17 @@ xfail_strict = true [tool.tox] envlist = [ "py39-django4.2", - "py39-django5.0", - "py39-django5.1", "py310-django4.2", - "py310-django5.0", - "py310-django5.1", + "py310-django5.2", "py311-django4.2", - "py311-django5.0", - "py311-django5.1", + "py311-django5.2", "py312-django4.2", - "py312-django5.0", - "py312-django5.1", - "py313-django4.2", - "py313-django5.0", - "py313-django5.1", + "py312-django5.2", + "py312-django6.0", + "py313-django5.2", + "py313-django6.0", + "py314-django5.2", + "py314-django6.0", ] [tool.tox.env_run_base] From 97f7eacaee2ce4cf01bd3dde364a159014513b49 Mon Sep 17 00:00:00 2001 From: Johannes Date: Thu, 19 Feb 2026 09:03:31 +0100 Subject: [PATCH 6/7] split build step from publishing --- .github/workflows/ci.yaml | 41 +++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 26e8ff0..e8226e0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,11 +3,11 @@ name: CI on: push: branches: [main] - tags: ["v*"] # run on version tags + tags: ["v*"] # run on version tags pull_request: - branches: [main] # run on PRs targeting main + branches: [main] # run on PRs targeting main release: - types: [published] # run on Github release + types: [published] # run on Github release jobs: lint: @@ -35,9 +35,24 @@ jobs: run: pip install tox tox-gh-actions - name: Run tests run: tox + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version: "3.14" + - name: Install build tools + run: pip install build + - name: Build package + run: python -m build + - uses: actions/upload-artifacts@v4 + with: + name: dist + path: dist/ publish-pypi: name: Upload release to PyPI - needs: [lint, test] # wait for test and lint to pass + needs: [lint, test, build] # wait for test and lint to pass if: github.event_name == 'release' # only on release runs-on: ubuntu-latest environment: @@ -46,17 +61,15 @@ jobs: permissions: id-token: write # required for trusted publishing steps: - - uses: actions/checkout@v6 - - uses: actions/setup-python@v6 + - uses: actions/download-artifacts@v6 with: - python-version: "3.14" - - name: Build package - run: python setup.py sdist bdist_wheel + name: dist + path: dist/ - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@release/v1 publish-pypi-test: name: Upload release to test PyPI - needs: [lint, test] # wait for test and lint to pass + needs: [lint, test, build] # wait for test and lint to pass if: startsWith(github.ref, 'refs/tags/') # only on tags runs-on: ubuntu-latest environment: @@ -65,12 +78,10 @@ jobs: permissions: id-token: write # required for trusted publishing steps: - - uses: actions/checkout@v6 - - uses: actions/setup-python@v6 + - uses: actions/download-artifacts@v6 with: - python-version: "3.14" - - name: Build package - run: python setup.py sdist bdist_wheel + name: dist + path: dist/ - name: Publish package to test PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: From 44dc7ca07fa556ad92b6e26aad14c2b8e96da927 Mon Sep 17 00:00:00 2001 From: Johannes Date: Thu, 19 Feb 2026 09:20:51 +0100 Subject: [PATCH 7/7] fix download/upload artifact action name --- .github/workflows/ci.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e8226e0..39cff96 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,6 +36,8 @@ jobs: - name: Run tests run: tox build: + name: Build release + needs: [lint, test] runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 @@ -46,13 +48,13 @@ jobs: run: pip install build - name: Build package run: python -m build - - uses: actions/upload-artifacts@v4 + - uses: actions/upload-artifact@v6 with: name: dist path: dist/ publish-pypi: name: Upload release to PyPI - needs: [lint, test, build] # wait for test and lint to pass + needs: [build] # wait for build if: github.event_name == 'release' # only on release runs-on: ubuntu-latest environment: @@ -61,7 +63,7 @@ jobs: permissions: id-token: write # required for trusted publishing steps: - - uses: actions/download-artifacts@v6 + - uses: actions/download-artifact@v7 with: name: dist path: dist/ @@ -69,7 +71,7 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 publish-pypi-test: name: Upload release to test PyPI - needs: [lint, test, build] # wait for test and lint to pass + needs: [build] # wait for build if: startsWith(github.ref, 'refs/tags/') # only on tags runs-on: ubuntu-latest environment: @@ -78,7 +80,7 @@ jobs: permissions: id-token: write # required for trusted publishing steps: - - uses: actions/download-artifacts@v6 + - uses: actions/download-artifact@v7 with: name: dist path: dist/