Skip to content

Commit

Permalink
Update support matrices
Browse files Browse the repository at this point in the history
- Drop support for Python 3.8
- Drop support for Django < 4.2 LTS
- Add support for Python 3.12
- Test on Django 5.0
- Drop support for unsupported versions of Postgres, MariaDB, MySQL
  • Loading branch information
arnav13081994 authored and jleclanche committed Apr 25, 2024
1 parent a2bed9a commit 4387af3
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 37 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

services:
postgres:
image: postgres:12
image: postgres:16
env:
POSTGRES_PASSWORD: djstripe
POSTGRES_DB: djstripe
Expand All @@ -39,7 +39,7 @@ jobs:
--health-timeout 5s
--health-retries 5
mysql:
image: mysql:8.0
image: mysql:8.3
env:
MYSQL_ROOT_PASSWORD: djstripe
MYSQL_DATABASE: djstripe
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: ./.github/install_poetry_action
with:
POETRY_VERSION: ${{ env.POETRY_VERSION }}
python_version: "3.11"
python_version: "3.12"

- name: Install dependencies
run: poetry install --with docs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12
image: postgres:16
env:
POSTGRES_PASSWORD: djstripe
POSTGRES_DB: djstripe
Expand All @@ -35,7 +35,7 @@ jobs:
- uses: ./.github/install_poetry_action
with:
POETRY_VERSION: ${{ env.POETRY_VERSION }}
python_version: "3.11"
python_version: "3.12"

- name: Install pre-commit
run: poetry install --with dev -E postgres
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: "23.3.0"
rev: "24.4.1"
hooks:
- id: black

- repo: https://github.com/timothycrosley/isort
rev: "5.12.0"
rev: "5.13.2"
hooks:
- id: isort

Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mkdocs:
configuration: mkdocs.yml

python:
version: "3.11"
version: "3.12"
install:
- method: pip
path: .
Expand Down
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ The full documentation is available [on Read the Docs](https://dj-stripe.github.

## Requirements

- Django >=3.2
- Python >=3.8
- PostgreSQL engine (recommended) >=9.6
- MySQL engine: MariaDB >=10.2 or MySQL >=5.7
- Django >=4.2
- Python >=3.9
- PostgreSQL engine (recommended) >=12
- MySQL engine: MariaDB >=10.5 or MySQL >=8.0
- SQLite: Not recommended in production. Version >=3.26 required.

## Installation
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/using_with_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ volumes:
services:

db:
image: postgres:12
image: postgres:16
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
Expand Down
16 changes: 7 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ classifiers = [
"Topic :: Office/Business :: Financial",
"Topic :: Software Development :: Libraries :: Python Modules",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
]

packages = [{ include = "djstripe" }]
Expand All @@ -33,20 +31,20 @@ exclude = ["manage.py"]


[tool.poetry.dependencies]
python = "^3.8.0"
django = ">=3.2"
python = "^3.9.0"
django = ">=4.2"
stripe = ">=8.0.0"
psycopg2 = { version = "^2.8.5", optional = true }
mysqlclient = { version = ">=1.4.0", optional = true }

[tool.poetry.group.dev]
optional = true
[tool.poetry.group.dev.dependencies]
black = ">=23.3.0"
isort = ">=5.12.0"
black = ">=24.4.1"
isort = ">=5.13.2"
pytest = ">=7.3.1"
pytest-django = ">=4.5.2"
mypy = ">=1.2.0"
mypy = ">=1.10.0"

# flake8 = ">=5.0.4"
# Why is flake8 commented out?
Expand Down Expand Up @@ -95,7 +93,7 @@ mypy = ">=1.2.0"
# I'm grateful flake8 exists. But it's not a useful enough tool to allow it to
# waste our time like this, and it's largely been displaced by the other tools:
# mypy, isort, and black. So let's stick to those instead.
pre-commit = "^3.0.4"
pre-commit = "^3.7.0"

[tool.poetry.group.docs]
optional = true
Expand Down
20 changes: 6 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
[tox]
isolated_build = True
envlist =
# Django 3.2 LTS. Limited support matrix.
django32-py{38,39,310}-{postgres,mysql}
# Django 4.0
django40-py{38,39,310}-{postgres,mysql,sqlite}
# Django 4.1
django41-py{38,39,310,311}-{postgres,mysql,sqlite}
# Django 4.2
django42-py{38,39,310,311}-{postgres,mysql,sqlite}
django42-py{39,310,311,312}-{postgres,mysql,sqlite}
django50-py{310,311,312}-{postgres,mysql,sqlite}
# Django mainline - Only test on latest python / postgres
djangomain-py311-postgres
djangomain-py312-postgres

skip_missing_interpreters = True

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[testenv]
passenv = DJSTRIPE_*
Expand All @@ -35,10 +29,8 @@ deps =
postgres: psycopg2>=2.9
mysql: mysqlclient>=1.4.0

django32: Django==3.2,<3.3
django40: Django==4.0,<4.1
django41: Django==4.1,<4.2
django42: Django==4.2,<4.3
django42: Django>=4.2,<4.3
django50: Django>=5.0,<5.1
djangomain: https://github.com/django/django/archive/main.tar.gz
pytest-django
pytest-cov
Expand Down

0 comments on commit 4387af3

Please sign in to comment.