From e26e7fe9b0197fe93426ba15878a937a37657497 Mon Sep 17 00:00:00 2001 From: wongcht Date: Sun, 27 Aug 2023 09:50:18 +0100 Subject: [PATCH] Backport Python 3.11 and Django 4.2 in v2 (#1456) * bump to support py3.11 dj4.2 * Update tox.ini django42 <43 Co-authored-by: Kien Dang * Apply suggestions from code review master to main Co-authored-by: Kien Dang * Update tox.ini Co-authored-by: wongcht --------- Co-authored-by: Kien Dang --- .github/workflows/deploy.yml | 4 ++-- .github/workflows/lint.yml | 4 ++-- .github/workflows/tests.yml | 8 +++++++- .pre-commit-config.yaml | 2 +- setup.py | 3 +++ tox.ini | 13 +++++++++---- 6 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b91be11..da766fc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,10 +11,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.11" - name: Build wheel and source tarball run: | pip install wheel diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a458cd1..76722f8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,10 +8,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.11" - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7803de2..273b611 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,7 @@ jobs: strategy: max-parallel: 4 matrix: - django: ["2.2", "3.0", "3.1", "3.2", "4.0", "4.1"] + django: ["2.2", "3.0", "3.1", "3.2", "4.0", "4.1", "4.2"] python-version: ["3.8", "3.9"] include: - django: "2.2" @@ -25,6 +25,12 @@ jobs: python-version: "3.10" - django: "4.1" python-version: "3.10" + - django: "4.1" + python-version: "3.11" + - django: "4.2" + python-version: "3.10" + - django: "4.2" + python-version: "3.11" steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 021d38b..519dcfc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ default_language_version: - python: python3.10 + python: python3.11 repos: - repo: https://github.com/PyCQA/flake8 diff --git a/setup.py b/setup.py index 0ac0d91..9a0b134 100644 --- a/setup.py +++ b/setup.py @@ -50,6 +50,7 @@ setup( "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Programming Language :: Python :: Implementation :: PyPy", "Framework :: Django", "Framework :: Django :: 2.2", @@ -57,6 +58,8 @@ setup( "Framework :: Django :: 3.1", "Framework :: Django :: 3.2", "Framework :: Django :: 4.0", + "Framework :: Django :: 4.1", + "Framework :: Django :: 4.2", ], keywords="api graphql protocol rest relay graphene", packages=find_packages(exclude=["tests", "examples", "examples.*"]), diff --git a/tox.ini b/tox.ini index d9961cf..fe3dc86 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,9 @@ envlist = py{37,38,39}-django22, py{37,38,39}-django{30,31}, py{37,38,39,310}-django32, - py{38,39,310}-django{40,41,master}, + py{38,39,310}-django40, + py{38,39,310,311}-django{41,42}, + py{310,311}-djangomain, black,flake8 [gh-actions] @@ -12,6 +14,7 @@ python = 3.8: py38 3.9: py39 3.10: py310 + 3.11: py311 [gh-actions:env] DJANGO = @@ -21,7 +24,8 @@ DJANGO = 3.2: django32 4.0: django40 4.1: django41 - master: djangomaster + 4.2: django42 + main: djangomain [testenv] passenv = * @@ -38,11 +42,12 @@ deps = django32: Django>=3.2,<4.0 django40: Django>=4.0,<4.1 django41: Django>=4.1.3,<4.2 - djangomaster: https://github.com/django/django/archive/master.zip + django42: Django>=4.2,<4.3 + djangomain: https://github.com/django/django/archive/main.zip commands = {posargs:py.test --cov=graphene_django graphene_django examples} [testenv:pre-commit] -basepython = python3.10 +basepython = python3.11 skip_install = true deps = pre-commit commands =