From 49816bd53192d737faba6c79e4231222c725399c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?U=CC=88lgen=20Sar=C4=B1kavak?= Date: Mon, 31 Oct 2022 15:57:41 +0300 Subject: [PATCH 1/3] Add support for Python 3.11 --- .github/workflows/deploy.yml | 4 ++-- .github/workflows/lint.yml | 4 ++-- .github/workflows/tests.yml | 2 +- .pre-commit-config.yaml | 2 +- setup.py | 1 + tox.ini | 5 +++-- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a733c03de..139c6f683 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 8cee90a1b..bfafa67c2 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 31b479ea4..2a43833e7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ jobs: max-parallel: 4 matrix: django: ["3.2", "4.0", "4.1"] - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11"] include: - django: "3.2" python-version: "3.7" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index adb54c7a1..9214d35eb 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/pre-commit/pre-commit-hooks rev: v4.4.0 diff --git a/setup.py b/setup.py index 96da8ff0f..37b57a839 100644 --- a/setup.py +++ b/setup.py @@ -51,6 +51,7 @@ "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 :: 3.2", diff --git a/tox.ini b/tox.ini index 285d04621..9f8f79261 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = - py{37,38,39,310}-django32, - py{38,39,310}-django{40,41,main}, + py{37,38,39,310,311}-django32, + py{38,39,310,311}-django{40,41,main}, pre-commit [gh-actions] @@ -10,6 +10,7 @@ python = 3.8: py38 3.9: py39 3.10: py310 + 3.11: py311 [gh-actions:env] DJANGO = From aa0650aeb6a3fd5bb4159e8fb488607d6fdb0fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?U=CC=88lgen=20Sar=C4=B1kavak?= Date: Mon, 28 Nov 2022 01:47:45 +0300 Subject: [PATCH 2/3] Fix Python 3.11 compability matris --- .github/workflows/tests.yml | 4 +++- tox.ini | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2a43833e7..2c5b7550c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,10 +9,12 @@ jobs: max-parallel: 4 matrix: django: ["3.2", "4.0", "4.1"] - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10"] include: - django: "3.2" python-version: "3.7" + - django: "4.1" + python-version: "3.11" steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} diff --git a/tox.ini b/tox.ini index 9f8f79261..e186f30ef 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,8 @@ [tox] envlist = - py{37,38,39,310,311}-django32, - py{38,39,310,311}-django{40,41,main}, + py{37,38,39,310}-django32, + py{38,39,310}-django{40,41,main}, + py311-django{41,main} pre-commit [gh-actions] From 846422fccd9f19a31d400a5cc49c728e59306ff4 Mon Sep 17 00:00:00 2001 From: Firas Kafri Date: Thu, 4 May 2023 13:34:30 +0300 Subject: [PATCH 3/3] add temporary fix for enum description --- graphene_django/converter.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/graphene_django/converter.py b/graphene_django/converter.py index 9ad6c9d94..375d68312 100644 --- a/graphene_django/converter.py +++ b/graphene_django/converter.py @@ -96,7 +96,12 @@ class EnumWithDescriptionsType: def description(self): return str(named_choices_descriptions[self.name]) - return_type = Enum(name, list(named_choices), type=EnumWithDescriptionsType) + return_type = Enum( + name, + list(named_choices), + type=EnumWithDescriptionsType, + description="An enumeration.", # Temporary fix until https://github.com/graphql-python/graphene/pull/1502 is merged + ) return return_type