diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 790e5a8..69c0724 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.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 @@ -46,5 +46,5 @@ jobs: run: | (cd tests/utils && nohup python -m flask run --port 3000 &) wait-for-it localhost:3000 - ./govuk-frontend-diff http://localhost:3000 --govuk-frontend-version=v5.6.0 --exclude page-template --ci + ./govuk-frontend-diff http://localhost:3000 --govuk-frontend-version=v5.7.1 --exclude page-template --ci diff --git a/CHANGELOG.md b/CHANGELOG.md index 608142a..1e3cd4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,18 @@ 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-jinja/compare/3.3.0...main) +## [Unreleased](https://github.com/LandRegistry/govuk-frontend-jinja/compare/3.4.0...main) + +## [3.4.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/3.4.0) - xx/xx/2024 + +### Added + +- [GOV.UK Frontend v5.7.1](https://github.com/alphagov/govuk-frontend/releases/tag/v5.7.1) support +- Python 3.13 support + +### Removed + +- Python 3.8 support ## [3.3.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/3.3.0) - 29/08/2024 diff --git a/README.md b/README.md index df41cf8..585a725 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # GOV.UK Frontend Jinja Macros [![PyPI version](https://badge.fury.io/py/govuk-frontend-jinja.svg)](https://pypi.org/project/govuk-frontend-jinja/) -![govuk-frontend 5.6.0](https://img.shields.io/badge/govuk--frontend%20version-5.6.0-005EA5?logo=gov.uk&style=flat) +![govuk-frontend 5.7.1](https://img.shields.io/badge/govuk--frontend%20version-5.7.1-005EA5?logo=gov.uk&style=flat) [![Python package](https://github.com/LandRegistry/govuk-frontend-jinja/actions/workflows/python-package.yml/badge.svg)](https://github.com/LandRegistry/govuk-frontend-jinja/actions/workflows/python-package.yml) **GOV.UK Frontend Jinja 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.** @@ -14,29 +14,30 @@ If you are looking to build a fully featured Flask app that integrates with [GOV The following table shows the version of GOV.UK Frontend Jinja that you should use for your targeted version of GOV.UK Frontend: -| GOV.UK Frontend Jinja Version | Target GOV.UK Frontend Version | -| ----------------------------- | ------------------------------ | -| [3.3.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/3.3.0) | [5.6.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.6.0) | -| [3.2.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/3.2.0) | [5.5.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.5.0) | -| [3.1.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/3.1.0) | [5.4.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.4.0) | -| [3.0.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/3.0.0) | [5.1.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.1.0) | -| [2.8.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.8.0) | [4.8.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.8.0) | -| [2.7.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.7.0) | [4.7.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.7.0) | -| [2.6.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.6.0) | [4.6.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.6.0) | -| [2.5.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.5.0) | [4.5.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.5.0) | -| [2.4.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.4.0) | [4.4.1](https://github.com/alphagov/govuk-frontend/releases/tag/v4.4.1) | -| [2.3.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.3.0) | [4.2.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.2.0) | -| [2.2.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.2.0) | [4.1.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.1.0) | -| [2.1.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.1.0) | [4.0.1](https://github.com/alphagov/govuk-frontend/releases/tag/v4.0.1) | -| [2.0.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.0.0) | [4.0.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.0.0) | +| GOV.UK Frontend Jinja Version | Target GOV.UK Frontend Version | +| -------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| [3.4.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/3.4.0) | [5.7.1](https://github.com/alphagov/govuk-frontend/releases/tag/v5.7.1) | +| [3.3.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/3.3.0) | [5.6.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.6.0) | +| [3.2.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/3.2.0) | [5.5.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.5.0) | +| [3.1.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/3.1.0) | [5.4.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.4.0) | +| [3.0.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/3.0.0) | [5.1.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.1.0) | +| [2.8.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.8.0) | [4.8.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.8.0) | +| [2.7.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.7.0) | [4.7.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.7.0) | +| [2.6.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.6.0) | [4.6.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.6.0) | +| [2.5.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.5.0) | [4.5.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.5.0) | +| [2.4.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.4.0) | [4.4.1](https://github.com/alphagov/govuk-frontend/releases/tag/v4.4.1) | +| [2.3.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.3.0) | [4.2.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.2.0) | +| [2.2.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.2.0) | [4.1.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.1.0) | +| [2.1.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.1.0) | [4.0.1](https://github.com/alphagov/govuk-frontend/releases/tag/v4.0.1) | +| [2.0.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.0.0) | [4.0.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.0.0) | | [1.6.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/1.6.0) | [3.15.0](https://github.com/alphagov/govuk-frontend/releases/tag/v3.15.0) | | [1.5.1](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/1.5.1) | [3.14.0](https://github.com/alphagov/govuk-frontend/releases/tag/v3.14.0) | | [1.4.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/1.4.0) | [3.13.0](https://github.com/alphagov/govuk-frontend/releases/tag/v3.13.0) | | [1.3.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/1.3.0) | [3.12.0](https://github.com/alphagov/govuk-frontend/releases/tag/v3.12.0) | | [1.2.1](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/1.2.1) | [3.11.0](https://github.com/alphagov/govuk-frontend/releases/tag/v3.11.0) | | [1.1.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/1.1.0) | [3.10.2](https://github.com/alphagov/govuk-frontend/releases/tag/v3.10.2) | -| [1.0.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/1.0.0) | [3.8.1](https://github.com/alphagov/govuk-frontend/releases/tag/v3.8.1) | -| [0.2.1](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/0.2.1) | [3.7.0](https://github.com/alphagov/govuk-frontend/releases/tag/v3.7.0) | +| [1.0.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/1.0.0) | [3.8.1](https://github.com/alphagov/govuk-frontend/releases/tag/v3.8.1) | +| [0.2.1](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/0.2.1) | [3.7.0](https://github.com/alphagov/govuk-frontend/releases/tag/v3.7.0) | Any other versions of GOV.UK Frontend not shown above _may_ still be compatible, but have not been specifically tested and verified. @@ -64,10 +65,7 @@ To use a component in your project templates you must import and call the compon ```html {%- from 'govuk_frontend_jinja/components/button/macro.html' import govukButton -%} - -{{ govukButton({ - 'text': "Save and continue" -}) }} +{{ govukButton({ 'text': "Save and continue" }) }} ``` The options available to each component macro can be found in the original [GOV.UK Design System Components](https://design-system.service.gov.uk/components/) documentation. Since this project is a like-for-like port, the only difference between the Nunjucks examples and their Jinja equivalents is having to quote key names, e.g. `'text'` instead of `text`. diff --git a/requirements-test-3.10.txt b/requirements-test-3.10.txt index 2ee5911..014c02a 100644 --- a/requirements-test-3.10.txt +++ b/requirements-test-3.10.txt @@ -16,7 +16,7 @@ itsdangerous==2.2.0 # via flask jinja2==3.1.4 # via flask -markupsafe==2.1.5 +markupsafe==3.0.1 # via # jinja2 # werkzeug diff --git a/requirements-test-3.11.txt b/requirements-test-3.11.txt index 8c61e90..ef85982 100644 --- a/requirements-test-3.11.txt +++ b/requirements-test-3.11.txt @@ -16,7 +16,7 @@ itsdangerous==2.2.0 # via flask jinja2==3.1.4 # via flask -markupsafe==2.1.5 +markupsafe==3.0.1 # via # jinja2 # werkzeug diff --git a/requirements-test-3.12.txt b/requirements-test-3.12.txt index c7f4ced..103d42b 100644 --- a/requirements-test-3.12.txt +++ b/requirements-test-3.12.txt @@ -16,7 +16,7 @@ itsdangerous==2.2.0 # via flask jinja2==3.1.4 # via flask -markupsafe==2.1.5 +markupsafe==3.0.1 # via # jinja2 # werkzeug diff --git a/requirements-test-3.8.txt b/requirements-test-3.13.txt similarity index 64% rename from requirements-test-3.8.txt rename to requirements-test-3.13.txt index 2069977..159eda8 100644 --- a/requirements-test-3.8.txt +++ b/requirements-test-3.13.txt @@ -1,8 +1,8 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.13 # by the following command: # -# pip-compile --output-file=requirements-test-3.8.txt requirements-test.in +# pip-compile --output-file=requirements-test-3.13.txt requirements-test.in # blinker==1.8.2 # via flask @@ -12,13 +12,11 @@ flake8==7.1.1 # via -r requirements-test.in flask==3.0.3 # via -r requirements-test.in -importlib-metadata==8.4.0 - # via flask itsdangerous==2.2.0 # via flask jinja2==3.1.4 # via flask -markupsafe==2.1.5 +markupsafe==3.0.1 # via # jinja2 # werkzeug @@ -30,5 +28,3 @@ pyflakes==3.2.0 # via flake8 werkzeug==3.0.4 # via flask -zipp==3.20.1 - # via importlib-metadata diff --git a/requirements-test-3.9.txt b/requirements-test-3.9.txt index fe56803..6ffcf17 100644 --- a/requirements-test-3.9.txt +++ b/requirements-test-3.9.txt @@ -12,13 +12,13 @@ flake8==7.1.1 # via -r requirements-test.in flask==3.0.3 # via -r requirements-test.in -importlib-metadata==8.4.0 +importlib-metadata==8.5.0 # via flask itsdangerous==2.2.0 # via flask jinja2==3.1.4 # via flask -markupsafe==2.1.5 +markupsafe==3.0.1 # via # jinja2 # werkzeug @@ -30,5 +30,5 @@ pyflakes==3.2.0 # via flake8 werkzeug==3.0.4 # via flask -zipp==3.20.1 +zipp==3.20.2 # via importlib-metadata diff --git a/setup.py b/setup.py index 1a4f82a..bd8eaa3 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setuptools.setup( name="govuk-frontend-jinja", - version="3.3.0", + version="3.4.0", author="Matt Shaw", author_email="matthew.shaw@landregistry.gov.uk", description="GOV.UK Frontend Jinja Macros", @@ -24,19 +24,19 @@ package_data={"govuk_frontend_jinja": components}, classifiers=[ "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", + "Environment :: Web Environment", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - "Environment :: Web Environment", - "Operating System :: OS Independent", - "Intended Audience :: Developers", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Code Generators", "Topic :: Software Development :: User Interfaces", "Topic :: Text Processing :: Markup :: HTML", ], - python_requires=">=3.8", + python_requires=">=3.9", install_requires=["jinja2!=3.0.0,!=3.0.1"], ) diff --git a/tests/utils/test-entrypoint.sh b/tests/utils/test-entrypoint.sh index c2090e0..c0a27e8 100755 --- a/tests/utils/test-entrypoint.sh +++ b/tests/utils/test-entrypoint.sh @@ -5,4 +5,4 @@ set -e flake8 . (cd tests/utils && nohup python -m flask run --port 3000 &) wait-for-it localhost:3000 -./govuk-frontend-diff http://localhost:3000 --govuk-frontend-version=v5.6.0 --exclude page-template --ci +./govuk-frontend-diff http://localhost:3000 --govuk-frontend-version=v5.7.1 --exclude page-template --ci