Skip to content

Commit

Permalink
Add support for Python 3.12 (#1680)
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin committed Nov 10, 2023
1 parent 82418c0 commit 0e94780
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
- name: Install dependencies
run: |
python3 -m pip install setuptools wheel twine
Expand All @@ -32,7 +32,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
- name: Install dependencies
run: |
python3 -m pip install nox
Expand All @@ -47,7 +47,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
- name: Install dependencies
run: |
python3 -m pip install nox
Expand All @@ -66,6 +66,7 @@ jobs:
"3.9",
"3.10",
"3.11",
"3.12",
]
es-version: [8.0.0, 8.9.0]

Expand All @@ -82,7 +83,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python for Nox
if: matrix.python-version != '3.11'
if: matrix.python-version != '3.12'
uses: actions/setup-python@v4
with:
python-version: 3
Expand All @@ -93,4 +94,4 @@ jobs:
run: |
nox -rs test-${{ matrix.python-version }}
env:
WAIT_FOR_ES: "1"
WAIT_FOR_ES: "1"
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3"
python: "3.12"

python:
install:
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.9",
"3.10",
"3.11",
"3.12",
]
)
def test(session):
Expand All @@ -52,7 +53,7 @@ def test(session):
session.run("pytest", *argv)


@nox.session()
@nox.session(python="3.12")
def format(session):
session.install("black~=23.0", "isort")
session.run("black", "--target-version=py37", *SOURCE_FILES)
Expand All @@ -62,7 +63,7 @@ def format(session):
lint(session)


@nox.session
@nox.session(python="3.12")
def lint(session):
session.install("flake8", "black~=23.0", "isort")
session.run("black", "--check", "--target-version=py37", *SOURCE_FILES)
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ filterwarnings =
# https://github.com/elastic/elasticsearch-py/issues/2181#issuecomment-1490932964
ignore:The 'body' parameter is deprecated .*:DeprecationWarning
ignore:Legacy index templates are deprecated in favor of composable templates.:elasticsearch.exceptions.ElasticsearchWarning
ignore:datetime.datetime.utcfromtimestamp\(\) is deprecated and scheduled for removal in a future version..*:DeprecationWarning
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
],
Expand Down

0 comments on commit 0e94780

Please sign in to comment.