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

[Backport 8.16] Support Python 3.13 #2689

Merged
merged 1 commit into from
Nov 10, 2024
Merged
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
2 changes: 1 addition & 1 deletion .buildkite/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PYTHON_VERSION=3.12
ARG PYTHON_VERSION=3.13
FROM python:${PYTHON_VERSION}

# Default UID/GID to 1000
Expand Down
5 changes: 3 additions & 2 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
steps:
- label: ":elasticsearch: :python: ES Python ({{ matrix.python }}) {{ matrix.nox_session }} "
- label: ":elasticsearch: :python: ES Python {{ matrix.python }} {{ matrix.nox_session }} ({{ matrix.connection }})"
agents:
provider: "gcp"
env:
Expand All @@ -16,6 +16,7 @@ steps:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
connection:
- "urllib3"
- "requests"
Expand All @@ -27,7 +28,7 @@ steps:
connection: "urllib3"
nox_session: "test_otel"
- with:
python: "3.12"
python: "3.13"
connection: "urllib3"
nox_session: "test_otel"
command: ./.buildkite/run-tests
4 changes: 2 additions & 2 deletions .buildkite/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Default environment variables
export STACK_VERSION="${STACK_VERSION:=8.0.0-SNAPSHOT}"
export TEST_SUITE="${TEST_SUITE:=platinum}"
export PYTHON_VERSION="${PYTHON_VERSION:=3.9}"
export PYTHON_VERSION="${PYTHON_VERSION:=3.13}"
export PYTHON_CONNECTION_CLASS="${PYTHON_CONNECTION_CLASS:=urllib3}"

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

if [[ -n "$RUNSCRIPTS" ]]; then
for RUNSCRIPT in ${RUNSCRIPTS//,/ } ; do
for RUNSCRIPT in ${RUNSCRIPTS//,/ }; do
echo -e "\033[1m>>>>> Running run-$RUNSCRIPT.sh >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
CONTAINER_NAME=${RUNSCRIPT} \
DETACH=true \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
nox-session: [""]
runs-on: ["ubuntu-latest"]

Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build:
# to set AIOHTTP_NO_EXTENSIONS to 1 but it has to be done in
# https://readthedocs.org/dashboard/elasticsearch-py/environmentvariables/
# because of https://github.com/readthedocs/readthedocs.org/issues/6311
python: "3.12"
python: "3"

python:
install:
Expand Down
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ def pytest_argv():
]


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

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


@nox.session(python=["3.8", "3.12"])
@nox.session(python=["3.8", "3.13"])
def test_otel(session):
session.install(
".[dev]",
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ classifiers = [
"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 Expand Up @@ -69,7 +70,7 @@ dev = [
"nox",
"orjson",
"numpy",
"simsimd",
"simsimd ; python_version<'3.13'",
"pyarrow",
"pandas",
"mapbox-vector-tile",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,8 @@ def test_max_marginal_relevance_search_errors(
self, sync_client: Elasticsearch, index: str
) -> None:
"""Test max marginal relevance search error conditions."""
pytest.importorskip("simsimd")

texts = ["foo", "bar", "baz"]
vector_field = "vector_field"
embedding_service = ConsistentFakeEmbeddings()
Expand Down Expand Up @@ -940,6 +942,8 @@ def test_max_marginal_relevance_search(
self, sync_client: Elasticsearch, index: str
) -> None:
"""Test max marginal relevance search."""
pytest.importorskip("simsimd")

texts = ["foo", "bar", "baz"]
vector_field = "vector_field"
text_field = "text_field"
Expand Down
Loading