diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 22cc90c..3ebb644 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.7", "3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6eb3761..c7a4b16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://github.com/LandRegistry/govuk-frontend-wtf/compare/1.2.1..main) +## [Unreleased](https://github.com/LandRegistry/govuk-frontend-wtf/compare/2.0.0..main) + +## [2.0.0](https://github.com/LandRegistry/govuk-frontend-wtf/releases/tag/2.0.0) - 13/01/2022 + +### Added + +- [GOV.UK Frontend v4.0.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.0.0) support + +### Removed + +- Python 3.6 support ## [1.2.1](https://github.com/LandRegistry/govuk-frontend-wtf/releases/tag/1.2.1) - 08/12/2021 diff --git a/README.md b/README.md index 856255e..87f457c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # GOV.UK Frontend WTForms Widgets [![PyPI version](https://badge.fury.io/py/govuk-frontend-wtf.svg)](https://pypi.org/project/govuk-frontend-wtf/) -![govuk-frontend 3.14.0](https://img.shields.io/badge/govuk--frontend%20version-3.14.0-005EA5?logo=gov.uk&style=flat) +![govuk-frontend 4.0.0](https://img.shields.io/badge/govuk--frontend%20version-4.0.0-005EA5?logo=gov.uk&style=flat) [![Python package](https://github.com/LandRegistry/govuk-frontend-wtf/actions/workflows/python-package.yml/badge.svg)](https://github.com/LandRegistry/govuk-frontend-wtf/actions/workflows/python-package.yml) **GOV.UK Frontend WTForms is a [community tool](https://design-system.service.gov.uk/community/resources-and-tools/) of the [GOV.UK Design System](https://design-system.service.gov.uk/). The Design System team is not responsible for it and cannot support you with using it. Contact the [maintainers](#contributors) directly if you need [help](#support) or you want to request a feature.** diff --git a/setup.py b/setup.py index d76edf0..7b3b159 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="govuk-frontend-wtf", - version="1.2.1", + version="2.0.0", author="Matt Shaw", author_email="matthew.shaw@landregistry.gov.uk", description="GOV.UK Frontend WTForms Widgets", @@ -33,12 +33,12 @@ "Topic :: Software Development :: User Interfaces", "Topic :: Text Processing :: Markup :: HTML", ], - python_requires=">=3.6", + python_requires=">=3.7", install_requires=[ "deepmerge", "flask", "flask-wtf", - "govuk-frontend-jinja<2.0.0", + "govuk-frontend-jinja>=2.0.0", "jinja2", "wtforms", ], diff --git a/tests/fixtures/wtf_widgets_data.yaml b/tests/fixtures/wtf_widgets_data.yaml index 3e1f6f8..675049e 100644 --- a/tests/fixtures/wtf_widgets_data.yaml +++ b/tests/fixtures/wtf_widgets_data.yaml @@ -33,7 +33,7 @@ TestStringField: expected_output: - - - - \s*\s*Error:\s*\s*Example serverside error - type "John Smith" into this field to suppress it\s* + -

\s*\s*Error:\s*\s*Example serverside error - type "John Smith" into this field to suppress it\s*

-
-
\s*StringFieldHint\s*
@@ -144,7 +144,7 @@ TestEmailField: data: email_field: foo expected_output: - - \s*\s*Error:\s*\s*Email is not valid\s* + -

\s*\s*Error:\s*\s*Email is not valid\s*

-
\s*EmailFieldHint\s*
- - @@ -184,7 +184,7 @@ TestFloatField: expected_output: - - - - \s*\s*Error:\s*\s*Not a valid float value.\s* + -

\s*\s*Error:\s*\s*Not a valid float value.\s*

-
-
\s*FloatFieldHint\s*
@@ -222,7 +222,7 @@ TestIntegerField: expected_output: - - - - \s*\s*Error:\s*\s*Not a valid integer value.\s* + -

\s*\s*Error:\s*\s*Not a valid integer value.\s*

-
-
\s*IntegerFieldHint\s*
@@ -260,7 +260,7 @@ TestDecimalField: expected_output: - - - - \s*\s*Error:\s*\s*Not a valid decimal value.\s* + -

\s*\s*Error:\s*\s*Not a valid decimal value.\s*

-
-
\s*DecimalFieldHint\s*
@@ -300,7 +300,7 @@ TestTextAreaField: expected_output: - - - - \s*\s*Error:\s*\s*TextAreaField is required\s* + -

\s*\s*Error:\s*\s*TextAreaField is required\s*

-
-
\s*TextAreaFieldHint\s*
@@ -342,7 +342,7 @@ TestCharacterCountField: expected_output: - - - - \s*\s*Error:\s*\s*CharacterCountField is required\s* + -

\s*\s*Error:\s*\s*CharacterCountField is required\s*

-
-
\s*CharacterCountFieldHint\s*
-
\s*You can enter up to 200 characters\s*
@@ -386,7 +386,7 @@ TestBooleanField: method: post expected_output: -
\s*BooleanFieldHint\s*
- - \s*\s*Error:\s*\s*Please tick the box\s* + -

\s*\s*Error:\s*\s*Please tick the box\s*

-
-
- @@ -414,7 +414,7 @@ TestSelectMultipleField: expected_output: -
-
- - \s*\s*Error:\s*\s*'<script>alert\("Hello"\)</script>' is not a valid choice for this field.\s* + -

\s*\s*Error:\s*\s*'<script>alert\("Hello"\)</script>' is not a valid choice for this field.\s*

- - - @@ -449,7 +449,7 @@ TestSelectMultipleField: expected_output: -
-
- - \s*\s*Error:\s*\s*'foo' is not a valid choice for this field.\s* + -

\s*\s*Error:\s*\s*'foo' is not a valid choice for this field.\s*

- - - @@ -480,7 +480,7 @@ TestSelectField: -
- - - - \s*\s*Error:\s*\s*Not a valid choice.\s* + -

\s*\s*Error:\s*\s*Not a valid choice.\s*

- - - @@ -524,7 +524,7 @@ TestRadioField: test_empty_get: expected_output: -
- -
+ -
-
- - @@ -540,8 +540,8 @@ TestRadioField: radio_field: expected_output: -
- - \s*\s*Error:\s*\s*Not a valid choice.\s* - -
+ -

\s*\s*Error:\s*\s*Not a valid choice.\s*

+ -
-
- - @@ -559,7 +559,7 @@ TestRadioField: radio_field: two expected_output: -
- -
+ -
-
- - @@ -575,8 +575,8 @@ TestRadioField: radio_field: foo expected_output: -
- - \s*\s*Error:\s*\s*Not a valid choice.\s* - -
+ -

\s*\s*Error:\s*\s*Not a valid choice.\s*

+ -
-
- - @@ -707,7 +707,7 @@ TestPasswordField: expected_output: -
- - - \s*\s*Error:\s*\s*Please ensure both password fields match\s* + -

\s*\s*Error:\s*\s*Please ensure both password fields match\s*

# Ensure that passwords are not represented in the output for security reasons - input class="govuk-input govuk-input--error" id="password_field" name="password_field" type="password" spellcheck="false" aria-describedby="password_field-hint password_field-error" required="required"> -
\s*PasswordFieldHint\s*
diff --git a/tests/requirements.in b/tests/requirements.in index d3bbc6d..2520c99 100644 --- a/tests/requirements.in +++ b/tests/requirements.in @@ -1,8 +1,8 @@ -deepmerge==0.3.0 +deepmerge==1.0.1 email_validator==1.1.3 flask-wtf==1.0.0 flask==2.0.2 -govuk-frontend-jinja==1.5.1 +govuk-frontend-jinja==2.0.0 pytest-cov==3.0.0 pyyaml==6.0 # Generated with piprot 0.9.10 diff --git a/tests/requirements.txt b/tests/requirements.txt index cb7731c..55fc5d1 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -4,13 +4,13 @@ # # pip-compile requirements.in # -attrs==21.2.0 +attrs==21.4.0 # via pytest click==8.0.3 # via flask coverage[toml]==6.2 # via pytest-cov -deepmerge==0.3.0 +deepmerge==1.0.1 # via -r requirements.in dnspython==2.1.0 # via email-validator @@ -22,7 +22,7 @@ flask==2.0.2 # flask-wtf flask-wtf==1.0.0 # via -r requirements.in -govuk-frontend-jinja==1.5.1 +govuk-frontend-jinja==2.0.0 # via -r requirements.in idna==3.3 # via email-validator @@ -56,9 +56,9 @@ pyyaml==6.0 # via -r requirements.in toml==0.10.2 # via pytest -tomli==1.2.2 +tomli==2.0.0 # via coverage werkzeug==2.0.2 # via flask -wtforms==3.0.0 +wtforms==3.0.1 # via flask-wtf