Skip to content

Commit 2807398

Browse files
authored
Support Python 3.13 (elastic#2680)
1 parent a5da745 commit 2807398

File tree

8 files changed

+16
-10
lines changed

8 files changed

+16
-10
lines changed

Diff for: .buildkite/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PYTHON_VERSION=3.12
1+
ARG PYTHON_VERSION=3.13
22
FROM python:${PYTHON_VERSION}
33

44
# Default UID/GID to 1000

Diff for: .buildkite/pipeline.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
steps:
2-
- label: ":elasticsearch: :python: ES Python ({{ matrix.python }}) {{ matrix.nox_session }} "
2+
- label: ":elasticsearch: :python: ES Python {{ matrix.python }} {{ matrix.nox_session }} ({{ matrix.connection }})"
33
agents:
44
provider: "gcp"
55
env:
@@ -16,6 +16,7 @@ steps:
1616
- "3.10"
1717
- "3.11"
1818
- "3.12"
19+
- "3.13"
1920
connection:
2021
- "urllib3"
2122
- "requests"
@@ -27,7 +28,7 @@ steps:
2728
connection: "urllib3"
2829
nox_session: "test_otel"
2930
- with:
30-
python: "3.12"
31+
python: "3.13"
3132
connection: "urllib3"
3233
nox_session: "test_otel"
3334
command: ./.buildkite/run-tests

Diff for: .buildkite/run-tests

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Default environment variables
88
export STACK_VERSION="${STACK_VERSION:=8.0.0-SNAPSHOT}"
99
export TEST_SUITE="${TEST_SUITE:=platinum}"
10-
export PYTHON_VERSION="${PYTHON_VERSION:=3.9}"
10+
export PYTHON_VERSION="${PYTHON_VERSION:=3.13}"
1111
export PYTHON_CONNECTION_CLASS="${PYTHON_CONNECTION_CLASS:=urllib3}"
1212

1313
script_path=$(dirname $(realpath -s $0))
@@ -18,7 +18,7 @@ echo "--- :elasticsearch: Starting Elasticsearch"
1818
DETACH=true bash $script_path/run-elasticsearch.sh
1919

2020
if [[ -n "$RUNSCRIPTS" ]]; then
21-
for RUNSCRIPT in ${RUNSCRIPTS//,/ } ; do
21+
for RUNSCRIPT in ${RUNSCRIPTS//,/ }; do
2222
echo -e "\033[1m>>>>> Running run-$RUNSCRIPT.sh >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
2323
CONTAINER_NAME=${RUNSCRIPT} \
2424
DETACH=true \

Diff for: .github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
26+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
2727
nox-session: [""]
2828
runs-on: ["ubuntu-latest"]
2929

Diff for: .readthedocs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build:
77
# to set AIOHTTP_NO_EXTENSIONS to 1 but it has to be done in
88
# https://readthedocs.org/dashboard/elasticsearch-py/environmentvariables/
99
# because of https://github.com/readthedocs/readthedocs.org/issues/6311
10-
python: "3.12"
10+
python: "3"
1111

1212
python:
1313
install:

Diff for: noxfile.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ def pytest_argv():
4545
]
4646

4747

48-
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"])
48+
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"])
4949
def test(session):
5050
session.install(".[dev]", env=INSTALL_ENV, silent=False)
5151

5252
session.run(*pytest_argv(), *session.posargs)
5353

5454

55-
@nox.session(python=["3.8", "3.12"])
55+
@nox.session(python=["3.8", "3.13"])
5656
def test_otel(session):
5757
session.install(
5858
".[dev]",

Diff for: pyproject.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ classifiers = [
2626
"Programming Language :: Python :: 3.10",
2727
"Programming Language :: Python :: 3.11",
2828
"Programming Language :: Python :: 3.12",
29+
"Programming Language :: Python :: 3.13",
2930
"Programming Language :: Python :: Implementation :: CPython",
3031
"Programming Language :: Python :: Implementation :: PyPy",
3132
]
@@ -69,7 +70,7 @@ dev = [
6970
"nox",
7071
"orjson",
7172
"numpy",
72-
"simsimd",
73+
"simsimd ; python_version<'3.13'",
7374
"pyarrow",
7475
"pandas",
7576
"mapbox-vector-tile",

Diff for: test_elasticsearch/test_server/test_vectorstore/test_vectorstore.py

+4
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,8 @@ def test_max_marginal_relevance_search_errors(
899899
self, sync_client: Elasticsearch, index: str
900900
) -> None:
901901
"""Test max marginal relevance search error conditions."""
902+
pytest.importorskip("simsimd")
903+
902904
texts = ["foo", "bar", "baz"]
903905
vector_field = "vector_field"
904906
embedding_service = ConsistentFakeEmbeddings()
@@ -940,6 +942,8 @@ def test_max_marginal_relevance_search(
940942
self, sync_client: Elasticsearch, index: str
941943
) -> None:
942944
"""Test max marginal relevance search."""
945+
pytest.importorskip("simsimd")
946+
943947
texts = ["foo", "bar", "baz"]
944948
vector_field = "vector_field"
945949
text_field = "text_field"

0 commit comments

Comments
 (0)