Files
zhuwenxingandGitHub ff42b9502e enhance: upgrade test Python runtime to 3.12 (#49622)
issue: #49516

### What changed

- Upgrade test runtime pins and Docker base images to Python 3.12.
- Update tests ruff target and Python-version docs to 3.12.
- Refresh Python client dependency pins that block Python 3.12
installation.
- Scope TestPyPI lookup to pymilvus via find-links so uv does not
require unsafe-best-match.
- Suppress third-party invalid escape sequence SyntaxWarning noise seen
during Python 3.12 pytest collection.

### Verification

- git diff --check
- uv pip install --python /tmp/milvus-tests-py312-uv-default/bin/python
--dry-run -r tests/python_client/requirements.txt
- python3.12 -m venv /tmp/milvus-tests-py312-pip-requirements && pip
install -r tests/python_client/requirements.txt --timeout 30 --retries 6
- pip check
- python -c 'import pymilvus, ujson; print(pymilvus.__version__,
ujson.__version__)'
- python -m pytest --collect-only -q
milvus_client/test_milvus_client_collection.py

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2026-05-11 10:08:09 +08:00

30 lines
837 B
Docker

FROM python:3.12-bullseye
RUN apt-get update && apt-get install -y jq
# Define the ARG variable
ARG PIP_TRUSTED_HOST=""
ARG PIP_INDEX_URL=""
ARG PIP_INDEX=""
ARG PIP_FIND_LINKS=""
# Set the ENV variable
ENV PIP_TRUSTED_HOST=${PIP_TRUSTED_HOST}
ENV PIP_INDEX_URL=${PIP_INDEX_URL}
ENV PIP_INDEX=${PIP_INDEX}
ENV PIP_FIND_LINKS=${PIP_FIND_LINKS}
WORKDIR /milvus
COPY tests/python_client/requirements.txt tests/python_client/requirements.txt
RUN cd tests/python_client && python3 -m pip install --upgrade setuptools \
&& python3 -m pip install --upgrade pip \
&& python3 -m pip install --no-cache-dir -r requirements.txt --timeout 30 --retries 6
COPY tests/python_client tests/python_client
COPY tests/restful_client tests/restful_client
COPY tests/restful_client_v2 tests/restful_client_v2
COPY tests/scripts tests/scripts