Skip to content

Commit

Permalink
Merge pull request #10 from nimasmi/chore/upgrade-python-and-django
Browse files Browse the repository at this point in the history
Chore/upgrade python and django
  • Loading branch information
nimasmi authored Nov 13, 2023
2 parents fb0d5a6 + 3b59e05 commit f7ffcd2
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 56 deletions.
46 changes: 15 additions & 31 deletions .github/workflows/CI-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,28 @@ name: CI tests
on: [push]

env:
poetry-version: 1.1.2
poetry-version: 1.2.0

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python "3.6"
uses: actions/setup-python@v2
- name: Set up Python "3.9"
uses: actions/setup-python@v4
with:
python-version: "3.6"
- uses: pre-commit/action@v2.0.0
python-version: "3.9"
- uses: pre-commit/action@v3.0.0

build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: "3.9"
django-version: "2.2.20"
- python-version: "3.9"
django-version: "3.1.8"
- python-version: "3.6"
django-version: "3.2"
- python-version: "3.7"
django-version: "3.2"
- python-version: "3.8"
django-version: "3.2"
- python-version: "3.9"
django-version: "3.2"
python-version: ["3.8", "3.9", "3.10", "3.11"]
django-version: ["3.2.9", "4.1.3", "4.2"]
exclude:
- django-version: "3.2"
python-version: "3.11"
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -60,19 +52,11 @@ jobs:
needs: [build, lint]
strategy:
matrix:
include:
- python-version: "3.9"
django-version: "2.2.20"
- python-version: "3.9"
django-version: "3.1.8"
- python-version: "3.6"
django-version: "3.2"
- python-version: "3.7"
django-version: "3.2"
- python-version: "3.8"
django-version: "3.2"
- python-version: "3.9"
django-version: "3.2"
python-version: ["3.8", "3.9", "3.10", "3.11"]
django-version: ["3.2.9", "4.1.3", "4.2"]
exclude:
- django-version: "3.2"
python-version: "3.11"
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
repos:
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.15
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
language_version: python3.6
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.7
language_version: python3.9
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8
language_version: python3.6
language_version: python3.9
- repo: https://github.com/python/black
rev: 19.10b0
rev: 23.10.1
hooks:
- id: black
language_version: python3.6
language_version: python3.9
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v6.5.1
hooks:
Expand All @@ -36,7 +36,7 @@ repos:
hooks:
- id: prettier
- repo: https://github.com/awebdeveloper/pre-commit-stylelint
sha: c4c991cd38b0218735858716b09924f8b20e3812
rev: c4c991cd38b0218735858716b09924f8b20e3812
hooks:
- id: stylelint
additional_dependencies:
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## Unreleased

### Features

- Support Python 3.10 and Python 3.11
- Drop support for Python 3.6 and Python 3.7
- Support Django 4.1 and 4.2
- Drop support for Django 2.2 and Django 3.1

### Development

- Upgrade pre-commit

## 0.3.0 (2021-05-07)

### Features
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ This is implemented as a custom Django email backend. It presents a similar inte

django-gov-notify supports:

- Python 3.6, 3.7, 3.8, and 3.9
- Django 2.2, 3.1 and 3.2
- Python 3.8, 3.9, 3.10 and 3.11
- Django 3.2, 4.1 and 4.2

## Installation

Expand Down
2 changes: 1 addition & 1 deletion django_gov_notify/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class NotifyEmailMessage(EmailMessage):
"""An email message that knows how to work with GOV.UK Notify templates. """
"""An email message that knows how to work with GOV.UK Notify templates."""

def __init__(
self,
Expand Down
26 changes: 13 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,30 @@ classifiers = [
"Operating System :: OS Independent",
"Topic :: Communications :: Email",
"Framework :: Django",
"Framework :: Django :: 2.2",
"Framework :: Django :: 3.1",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
license = "BSD-2-Clause"

[tool.poetry.dependencies]
python = ">=3.6.1,<3.10"
django = ">=2.2.12,<4.0"
notifications-python-client = "^6.1.0"
python = ">=3.8,<3.12"
django = ">=3.2,<5.0"
notifications-python-client = "^8.1.0"

[tool.poetry.dev-dependencies]
black = "^19.10b0"
isort = "^4.3.21"
flake8 = "^3.8.2"
pre-commit = "^2.4.0"
detect-secrets = "0.13.0"
black = "^23.10.1"
isort = "^5.12.0"
flake8 = "^5.0.4"
pre-commit = "^3.5.0"
detect-secrets = "1.4.0"
factory-boy = "^3.2.0"

[build-system]
requires = ["poetry>=0.12"]
requires = ["poetry-core>=1.2.0"]
build-backend = "poetry.masonry.api"

0 comments on commit f7ffcd2

Please sign in to comment.