Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: 3.x
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
- uses: pre-commit-ci/lite-action@9d882e7a565f7008d4faf128f27d1cb6503d4ebf # v1.0.2
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0
if: ${{ !cancelled() }}
14 changes: 7 additions & 7 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.x'
cache: pip
Expand All @@ -17,7 +17,7 @@ jobs:
# Use the commit date instead of the current date during the build.
- run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
- run: python -m build
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
path: ./dist
create-release:
Expand All @@ -26,7 +26,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
- name: create release
run: >
gh release create --draft --repo ${{ github.repository }}
Expand All @@ -44,11 +44,11 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
- uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
- uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
with:
repository-url: https://test.pypi.org/legacy/
packages-dir: artifact/
- uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0
- uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
with:
packages-dir: artifact/
19 changes: 12 additions & 7 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,22 @@ jobs:
fail-fast: false
matrix:
include:
- {python: '3.14'}
- {python: '3.13'}
- {python: '3.12'}
- {python: '3.11'}
- {python: '3.10'}
- {python: '3.9'}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
cache: pip
- run: pip install tox
- run: tox run -e ${{ matrix.tox || format('py{0}', matrix.python) }}
- run: uv run pytest
minversions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
python-version: '3.10'
- run: uv run --resolution=lowest-direct pytest --override-ini=filterwarnings=
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ env/

# Editors
.idea

uv.lock
8 changes: 8 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Version 0.4.3
-------------

Unreleased

- Remove python 3.9 support
- Add python 3.14 support

Version 0.4.2
-------------

Expand Down
8 changes: 0 additions & 8 deletions MANIFEST.in

This file was deleted.

5 changes: 0 additions & 5 deletions docs/requirements.txt

This file was deleted.

54 changes: 52 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,28 @@ classifiers = [
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
"Topic :: Software Development :: Libraries :: Application Frameworks",
]
requires-python = ">=3.9"
requires-python = ">=3.10"
dependencies = [
"WTForms>=3.1",
"SQLAlchemy>=1.4",
]
dynamic = ["version"]

[dependency-groups]
docs = [
"Sphinx~=7.0.0",
"Pallets-Sphinx-Themes~=2.2.0",
"sphinx-issues~=4.0.0",
"sphinxcontrib-log-cabinet~=1.0.1",
"python-dateutil~=2.8.2",
]
dev = [
"coverage>=7.0",
"pytest>=8.0",
"prek>=0.1",
"tox-uv>=1.28.1",
]

[project.urls]
Documentation = "https://wtforms-sqlalchemy.readthedocs.io/"
Changes = "https://wtforms-sqlalchemy.readthedocs.io/changes/"
Expand All @@ -46,7 +61,6 @@ include = [
"docs/",
"tests/",
"CHANGES.rst",
"tox.ini",
]
exclude = [
"docs/_build/",
Expand All @@ -58,6 +72,42 @@ filterwarnings = [
"error",
]

[tool.tox]
env_list = [
"py313",
"py312",
"py311",
"py310",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.10 will be EOL in 6 months - you might want to consider whether to drop it now or only later. Now would likely be fine if you don't think someone has a strong need to update to the next release before 3.10 goes EOL anyway.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is cheap enough to continue supporting it until it is really EOL.

"pypy310",
"style",
"docs",
"minversions",
]

[tool.tox.env_run_base]
runner = "uv-venv-runner"
dependency_groups = ["dev"]
commands = [["pytest", "{posargs}"]]

[tool.tox.env.style]
skip_install = true
commands = [["prek", "run", "--all-files", "--show-diff-on-failure"]]

[tool.tox.env.docs]
dependency_groups = ["docs"]
commands = [["sphinx-build", "-W", "-b", "html", "-d", "{env_tmp_dir}/doctrees", "docs", "{env_tmp_dir}/html"]]

[tool.tox.env.coverage]
commands = [
["coverage", "run", "-m", "pytest", "--tb=short", "--basetemp={env_tmp_dir}", "{posargs}"],
["coverage", "html"],
["coverage", "report"],
]

[tool.tox.env.minversions]
uv_resolution = "lowest-direct"
commands = [["pytest", "--override-ini=filterwarnings=", "{posargs}"]]

[tool.coverage.run]
branch = true
source = ["wtforms_sqlalchemy", "tests"]
Expand Down
2 changes: 1 addition & 1 deletion tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def contains_validator(field, v_type):
class DummyPostData(dict):
def getlist(self, key):
v = self[key]
if not isinstance(v, (list, tuple)):
if not isinstance(v, list | tuple):
v = [v]
return v

Expand Down
30 changes: 0 additions & 30 deletions tox.ini

This file was deleted.

Loading