diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c7478655..b3ee8d2d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -52,7 +52,7 @@ jobs: --health-retries 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/install_poetry_action with: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ff4f3cfe6..fc0388e99 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -25,11 +25,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -40,7 +40,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -54,4 +54,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 422b675b2..898b79e8f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -19,12 +19,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - 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 diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 68a0f73c2..84cd935d9 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest services: postgres: - image: postgres:12 + image: postgres:16 env: POSTGRES_PASSWORD: djstripe POSTGRES_DB: djstripe @@ -30,12 +30,12 @@ jobs: --health-retries 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - 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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6380816c1..daeac8c3b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/.readthedocs.yml b/.readthedocs.yml index 8059eb389..5fe25695e 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -6,7 +6,7 @@ mkdocs: configuration: mkdocs.yml python: - version: "3.11" + version: "3.12" install: - method: pip path: . diff --git a/docs/README.md b/docs/README.md index 4f7482e7d..ba4276d04 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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 diff --git a/docs/usage/using_with_docker.md b/docs/usage/using_with_docker.md index 0d3507368..2c06734f2 100644 --- a/docs/usage/using_with_docker.md +++ b/docs/usage/using_with_docker.md @@ -16,7 +16,7 @@ volumes: services: db: - image: postgres:12 + image: postgres:16 volumes: - postgres-data:/var/lib/postgresql/data environment: diff --git a/pyproject.toml b/pyproject.toml index 62ce9c759..463ecc0c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" }] @@ -33,8 +31,8 @@ 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 } @@ -42,11 +40,11 @@ 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? @@ -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 diff --git a/tox.ini b/tox.ini index 0ab485f18..6adc9aca4 100644 --- a/tox.ini +++ b/tox.ini @@ -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_* @@ -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