Skip to content

Commit

Permalink
Support Python 3.13 (elastic#1938)
Browse files Browse the repository at this point in the history
* Support Python 3.13

* Explicitly ask for Python 3.13 in lint

* Revert to 3.12 for Read the Docs

It does not support Python 3.13.

* Restore 3.12 Nox Python version
  • Loading branch information
pquentin authored and miguelgrinberg committed Dec 9, 2024
1 parent e4470ed commit c4c8e8a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
python-version: "3.13"
- name: Install dependencies
run: |
python3 -m pip install nox
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
python-version: "3.x"
- name: Install dependencies
run: |
python3 -m pip install nox
Expand All @@ -81,8 +81,9 @@ jobs:
"3.10",
"3.11",
"3.12",
"3.13",
]
es-version: [8.0.0, 8.13.0]
es-version: [8.0.0, 8.15.0]

steps:
- name: Remove irrelevant software to free up disk space
Expand All @@ -104,11 +105,6 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python for Nox
if: matrix.python-version != '3.12'
uses: actions/setup-python@v4
with:
python-version: 3
- name: Install dependencies
run: |
python3 -m pip install nox
Expand Down
5 changes: 3 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"3.10",
"3.11",
"3.12",
"3.13",
]
)
def test(session):
Expand All @@ -55,7 +56,7 @@ def test(session):
session.run("pytest", *argv)


@nox.session(python="3.12")
@nox.session(python="3.13")
def format(session):
session.install("black~=24.0", "isort", "unasync", "setuptools", ".[develop]")
session.run("python", "utils/run-unasync.py")
Expand All @@ -67,7 +68,7 @@ def format(session):
lint(session)


@nox.session(python="3.12")
@nox.session(python="3.13")
def lint(session):
session.install("flake8", "black~=24.0", "isort", "unasync", "setuptools")
session.run("black", "--check", "--target-version=py38", *SOURCE_FILES)
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
],
Expand Down

0 comments on commit c4c8e8a

Please sign in to comment.