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 <kiend@pm.me>

* Apply suggestions from code review

master to main

Co-authored-by: Kien Dang <kiend@pm.me>

* Update tox.ini

Co-authored-by: wongcht <wongchunhong.work@gmail.com>

---------

Co-authored-by: Kien Dang <kiend@pm.me>
This commit is contained in:
wongcht 2023-08-27 09:50:18 +01:00 committed by GitHub
parent f3862510b9
commit e26e7fe9b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -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 }}

View File

@ -1,5 +1,5 @@
default_language_version:
python: python3.10
python: python3.11
repos:
- repo: https://github.com/PyCQA/flake8

View File

@ -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.*"]),

13
tox.ini
View File

@ -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 =