Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python 3.12 #1523

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@ jobs:
runs-on: ubuntu-latest

steps:
<<<<<<< support-3.12
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
=======
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
>>>>>>> master
with:
python-version: "3.10"
python-version: "3.11"
- name: Build wheel and source tarball
run: |
pip install wheel
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ jobs:
runs-on: ubuntu-latest

steps:
<<<<<<< support-3.12
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
=======
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
>>>>>>> master
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ jobs:
fail-fast: false
matrix:
include:
<<<<<<< support-3.12
- {name: '3.12.0-rc.1', python: '3.12.0-rc.1', os: ubuntu-latest, tox: py312}
=======
- {name: '3.12', python: '3.12', os: ubuntu-latest, tox: py312}
>>>>>>> master
- {name: '3.11', python: '3.11', os: ubuntu-latest, tox: py311}
- {name: '3.10', python: '3.10', os: ubuntu-latest, tox: py310}
- {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39}
Expand All @@ -52,12 +56,12 @@ jobs:
- run: pip install tox
- run: tox -e ${{ matrix.tox }}
- name: Upload coverage.xml
if: ${{ matrix.python == '3.10' }}
if: ${{ matrix.python == '3.11' }}
uses: actions/upload-artifact@v3
with:
name: graphene-coverage
path: coverage.xml
if-no-files-found: error
- name: Upload coverage.xml to codecov
if: ${{ matrix.python == '3.10' }}
if: ${{ matrix.python == '3.11' }}
uses: codecov/codecov-action@v3
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default_language_version:
python: python3.10
python: python3.11

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ tox
If you wish to run against a specific version defined in the `tox.ini` file:

```sh
tox -e py39
tox -e py311
```

Tox can only use whatever versions of Python are installed on your system. When you create a pull request, GitHub Actions pipelines will also be running the same tests and report the results, so there is no need for potential contributors to try to install every single version of Python on their own system ahead of time. We appreciate opening issues and pull requests to make graphene even more stable & useful!
Expand Down
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,11 @@ file:

.. code:: sh

<<<<<<< support-3.12
tox -e py311
=======
tox -e py10
>>>>>>> master

Tox can only use whatever versions of Python are installed on your
system. When you create a pull request, Travis will also be running the
Expand Down
1 change: 1 addition & 0 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Requirements
~~~~~~~~~~~~

- Python (3.8, 3.9, 3.10, 3.11, 3.12, pypy)

- Graphene (3.0)

Project setup
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ def run_tests(self):
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
<<<<<<< support-3.12
=======
"Programming Language :: Python :: 3.12",
>>>>>>> master
],
keywords="api graphql protocol rest relay graphene",
packages=find_packages(exclude=["examples*"]),
Expand Down
8 changes: 6 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ deps =
setenv =
PYTHONPATH = .:{envdir}
commands =
<<<<<<< support-3.12
py{38,39,310,311,312}: pytest --cov=graphene graphene --cov-report=term --cov-report=xml examples {posargs}
=======
py{38,39,310,311,12}: pytest --cov=graphene graphene --cov-report=term --cov-report=xml examples {posargs}
>>>>>>> master

[testenv:pre-commit]
basepython = python3.10
basepython = python3.11
deps =
pre-commit>=2.16,<3
setenv =
Expand All @@ -20,7 +24,7 @@ commands =
pre-commit run --all-files --show-diff-on-failure

[testenv:mypy]
basepython = python3.10
basepython = python3.11
deps =
mypy>=0.950,<1
commands =
Expand Down