mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-10 19:57:15 +03:00
Add support for Python 3.11 (#1365)
* Add support for Python 3.11 * Fix Python 3.11 compatibility matrix * Add temporary fix for default enum description --------- Co-authored-by: Firas Kafri <firaskafri@Firass-MacBook-Pro-2.local>
This commit is contained in:
parent
af8888f58e
commit
8540a9332c
4
.github/workflows/deploy.yml
vendored
4
.github/workflows/deploy.yml
vendored
|
@ -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
|
||||
|
|
4
.github/workflows/lint.yml
vendored
4
.github/workflows/lint.yml
vendored
|
@ -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
|
||||
|
|
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
|
@ -13,6 +13,8 @@ jobs:
|
|||
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 }}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -96,7 +96,12 @@ def convert_choices_to_named_enum_with_descriptions(name, choices):
|
|||
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
|
||||
|
||||
|
||||
|
|
1
setup.py
1
setup.py
|
@ -51,6 +51,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 :: 3.2",
|
||||
|
|
Loading…
Reference in New Issue
Block a user