Skip to content

Commit 197c467

Browse files
committed
Merge branch 'master' into pr38
2 parents 3a7ee3b + 7e5667d commit 197c467

File tree

18 files changed

+224
-120
lines changed

18 files changed

+224
-120
lines changed

.github/workflows/tests.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
python:
20+
- '3.12'
21+
- '3.11'
22+
- '3.10'
2023
- '3.9'
2124
- '3.8'
22-
- '3.7'
23-
- '3.6'
24-
- pypy3
25+
- pypy-3.10
2526
steps:
2627
- uses: actions/checkout@v2
2728
- uses: actions/setup-python@v2
@@ -39,7 +40,7 @@ jobs:
3940
- uses: actions/checkout@v2
4041
- uses: actions/setup-python@v2
4142
with:
42-
python-version: '3.9'
43+
python-version: '3.11'
4344
- uses: actions/cache@v1
4445
with:
4546
path: ~/.cache/pip
@@ -56,7 +57,7 @@ jobs:
5657
- uses: actions/checkout@v2
5758
- uses: actions/setup-python@v2
5859
with:
59-
python-version: '3.9'
60+
python-version: '3.11'
6061
- uses: actions/cache@v1
6162
with:
6263
path: ~/.cache/pip

.pre-commit-config.yaml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
---
22
repos:
33
- repo: https://github.com/asottile/pyupgrade
4-
rev: v2.2.1
4+
rev: v3.15.0
55
hooks:
66
- id: pyupgrade
7-
args: ["--py36-plus"]
7+
args: ["--py38-plus"]
88
- repo: https://github.com/asottile/reorder_python_imports
9-
rev: v2.2.0
9+
rev: v3.12.0
1010
hooks:
1111
- id: reorder-python-imports
1212
args: ["--application-directories", "src"]
1313
- repo: https://github.com/psf/black
14-
rev: 19.10b0
14+
rev: 23.9.1
1515
hooks:
1616
- id: black
17-
- repo: https://gitlab.com/pycqa/flake8
18-
rev: 3.7.9
17+
- repo: https://github.com/astral-sh/ruff-pre-commit
18+
rev: 'v0.0.292'
1919
hooks:
20-
- id: flake8
21-
additional_dependencies:
22-
- flake8-bugbear
23-
- flake8-implicit-str-concat
20+
- id: ruff
21+
args: [--fix, --exit-non-zero-on-fix]
2422
- repo: https://github.com/pre-commit/pre-commit-hooks
25-
rev: v2.5.0
23+
rev: v4.5.0
2624
hooks:
2725
- id: check-byte-order-marker
2826
- id: trailing-whitespace

.readthedocs.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@ python:
77
- requirements: docs/requirements.txt
88
sphinx:
99
builder: dirhtml
10+
formats:
11+
- pdf
12+
- epub
13+
build:
14+
os: "ubuntu-22.04"
15+
tools:
16+
python: "3.11"

CHANGES.rst

Lines changed: 29 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,59 @@
1-
Changes
2-
=======
1+
Unreleased
2+
----------
33

4-
Version 0.x
5-
-----------
4+
- Allow to override the default blank value. (:pr:`38`)
65

7-
Unreleased
6+
Version 0.4.0
7+
-------------
8+
9+
Released on January 4th, 2024
10+
11+
- Stop support for python 3.6 and 3.7. Start support for python3
12+
3.11 and 3.12. (:pr:`41`)
13+
- ``render_kw`` support (:pr:`42`)
14+
- ``optgroup`` support (:pr:`44`)
15+
- SQLAlchemy 2.0 support (:pr:`45`)
816

917
Version 0.3
1018
-----------
1119

1220
Released on November 6th, 2021
1321

14-
- Wtforms 3 support. (`#35`_)
15-
- SQLAlchemy 1.4 tests fixes. (`#34`_)
16-
- Switched from Travis CI to Github Actions (`#33`_)
17-
- Abandon deperecated validator. (`#32`_)
22+
- Wtforms 3 support. (:pr:`35`)
23+
- SQLAlchemy 1.4 tests fixes. (:pr:`34`)
24+
- Switched from Travis CI to Github Actions (:pr:`33`)
25+
- Abandon deperecated validator. (:pr:`32`)
1826

1927
Version 0.2
2028
-----------
2129

2230
Released on June 21st, 2020
2331

2432
- Auto-generated ``DecimalField`` does not limit places for ``Float``
25-
columns. (`#2`_)
26-
- Add an example of using this library with Flask-SQAlchemy. (`#3`_)
33+
columns. (:pr:`2`)
34+
- Add an example of using this library with Flask-SQAlchemy. (:pr:`3`)
2735
- Generating a form from a model copies any lists of validators
2836
passed in ``field_args`` to prevent modifying a shared value across
29-
forms. (`#5`_)
37+
forms. (:pr:`5`)
3038
- Don't add a ``Length`` validator when the column's length is not an
31-
int. (`#6`_)
39+
int. (:pr:`6`)
3240
- Add ``QueryRadioField``, like ``QuerySelectField`` except
3341
it renders a list of radio fields. Add ``QueryCheckboxField``, like
3442
``QuerySelectMultipleField`` except it renders a list of checkbox
35-
fields. (`#8`_)
43+
fields. (:pr:`8`)
3644
- Fix a compatibility issue with SQLAlchemy 2.1 that caused
37-
``QuerySelectField`` to fail with a ``ValueError``. (`#9`_, `#10`_,
38-
`#11`_)
45+
``QuerySelectField`` to fail with a ``ValueError``. (:issue:`9`, :pr:`10`,
46+
:pr:`11`)
3947
- QuerySelectField.query allowing no results instead of falling back to
40-
``query_factory``. (`#15`_)
41-
- Explicitly check if db_session is None in converter. (`#17`_)
48+
``query_factory``. (:pr:`15`)
49+
- Explicitly check if db_session is None in converter. (:pr:`17`)
4250
- Check for ``sqlalchemy.`` to avoid matching packages with names starting
4351
with ``sqlalchemy`` (6237a0f_)
44-
- Use SQLAlchemy's Column.doc for WTForm's Field.description (`#21`_)
45-
- Stopped support for python < 3.5 and added a style pre-commit hook. (`#23`_)
46-
- Documentation cleanup. (`#24`_)
52+
- Use SQLAlchemy's Column.doc for WTForm's Field.description (:pr:`21`)
53+
- Stopped support for python < 3.5 and added a style pre-commit hook. (:pr:`23`)
54+
- Documentation cleanup. (:pr:`24`)
4755

48-
.. _#2: https://github.com/wtforms/wtforms-sqlalchemy/pull/2
49-
.. _#3: https://github.com/wtforms/wtforms-sqlalchemy/pull/3
50-
.. _#5: https://github.com/wtforms/wtforms-sqlalchemy/pull/5
51-
.. _#6: https://github.com/wtforms/wtforms-sqlalchemy/pull/6
52-
.. _#8: https://github.com/wtforms/wtforms-sqlalchemy/pull/8
53-
.. _#9: https://github.com/wtforms/wtforms-sqlalchemy/issues/9
54-
.. _#10: https://github.com/wtforms/wtforms-sqlalchemy/pull/10
55-
.. _#11: https://github.com/wtforms/wtforms-sqlalchemy/pull/11
56-
.. _#15: https://github.com/wtforms/wtforms-sqlalchemy/pull/15
57-
.. _#17: https://github.com/wtforms/wtforms-sqlalchemy/pull/17
5856
.. _6237a0f: https://github.com/wtforms/wtforms-sqlalchemy/commit/6237a0f9e53ec5f22048be7f129e29f7f1c58448
59-
.. _#21: https://github.com/wtforms/wtforms-sqlalchemy/pull/21
60-
.. _#23: https://github.com/wtforms/wtforms-sqlalchemy/pull/23
61-
.. _#24: https://github.com/wtforms/wtforms-sqlalchemy/pull/24
62-
.. _#32: https://github.com/wtforms/wtforms-sqlalchemy/pull/32
63-
.. _#33: https://github.com/wtforms/wtforms-sqlalchemy/pull/33
64-
.. _#34: https://github.com/wtforms/wtforms-sqlalchemy/pull/34
65-
.. _#35: https://github.com/wtforms/wtforms-sqlalchemy/pull/35
6657

6758
Version 0.1
6859
-----------

README.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
WTForms-SQLAlchemy
22
==================
33

4-
.. image:: https://travis-ci.org/wtforms/wtforms-sqlalchemy.svg?branch=master
5-
:target: https://travis-ci.org/wtforms/wtforms-sqlalchemy
4+
.. image:: https://github.com/wtforms/wtforms-sqlalchemy/actions/workflows/tests.yaml/badge.svg
5+
:target: https://github.com/wtforms/wtforms-sqlalchemy/actions/workflows/tests.yaml
66
.. image:: https://readthedocs.org/projects/wtforms-sqlalchemy/badge/?version=latest&style=flat
77
:target: https://wtforms-sqlalchemy.readthedocs.io
88

@@ -14,8 +14,6 @@ to install::
1414

1515
pip install WTForms-SQLAlchemy
1616

17-
Python 3.6 to 3.10 are supported.
18-
1917
An example using Flask is included in ``examples/flask``.
2018

2119
Features

docs/changes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Changes
2+
=======
3+
4+
.. include:: ../CHANGES.rst

docs/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@
4040
),
4141
ProjectLink("PyPI Releases", "https://pypi.org/project/WTForms-SQLAlchemy/"),
4242
ProjectLink("Source Code", "https://github.com/wtforms/wtforms-sqlalchemy/"),
43-
ProjectLink("Discord Chat", "https://discord.gg/F65P7Z9",),
43+
ProjectLink(
44+
"Discord Chat",
45+
"https://discord.gg/F65P7Z9",
46+
),
4447
ProjectLink(
4548
"Issue Tracker", "https://github.com/wtforms/wtforms-sqlalchemy/issues/"
4649
),

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Contents:
1212
:maxdepth: 2
1313

1414
wtforms_sqlalchemy
15+
changes
1516

1617

1718
Indices and tables

docs/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Sphinx~=4.2.0
2-
Pallets-Sphinx-Themes~=2.0.1
3-
sphinx-issues~=1.2.0
1+
Sphinx~=7.2.6
2+
Pallets-Sphinx-Themes~=2.1.1
3+
sphinx-issues~=3.0.1
44
sphinxcontrib-log-cabinet~=1.0.1
55
python-dateutil~=2.8.1

examples/flask/basic.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
from wtforms_sqlalchemy.orm import model_form
2-
31
from flask import Flask
42
from flask import render_template
53
from flask import request
64
from flask_sqlalchemy import SQLAlchemy
5+
from wtforms_sqlalchemy.orm import model_form
76

87
app = Flask(__name__)
98
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///sample_db.sqlite"

0 commit comments

Comments
 (0)