OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[CI] [GHA] Add Python 3.15 + (t) (#38649)
Andrei Kashchikhin0a8f6f05f184
diff --git a/.github/actions/setup_python/action.yml b/.github/actions/setup_python/action.ymlindex b4028ff2d4d..d8cb4c1daca 100644--- a/.github/actions/setup_python/action.yml+++ b/.github/actions/setup_python/action.yml@@ -47,7 +47,29 @@ runs:DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user inputTZ: "Europe/London" # to prevent tzdata from waiting user input- - if: ${{ runner.os == 'macOS' || runner.os == 'Windows' || (runner.os == 'Linux' && steps.check_python.outputs.installed == 'false') }}+ - name: Install Python from NuGet (Windows)+ if: ${{ runner.os == 'Windows' && runner.arch == 'X64' && (inputs.version == '3.15' || inputs.version == '3.15t') }}+ shell: pwsh+ env:+ PYTHON_VERSION: ${{ inputs.version }}+ NUGET_PYTHON_VERSION: '3.15.2'+ run: |+ $package = if ($env:PYTHON_VERSION.EndsWith('t')) { 'python-freethreaded' } else { 'python' }+ $installDir = Join-Path $env:RUNNER_TEMP "nuget-python-$env:PYTHON_VERSION"+ $archive = "$installDir.zip"+ Invoke-WebRequest -Uri "https://api.nuget.org/v3-flatcontainer/$package/$env:NUGET_PYTHON_VERSION/$package.$env:NUGET_PYTHON_VERSION.nupkg" -OutFile $archive+ Expand-Archive -LiteralPath $archive -DestinationPath $installDir -Force+ $pythonDir = Join-Path $installDir 'tools'+ $python = Join-Path $pythonDir 'python.exe'+ & $python -m ensurepip --upgrade+ if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }+ Copy-Item -LiteralPath $python -Destination (Join-Path $pythonDir 'python3.exe') -Force+ $pythonDir >> $env:GITHUB_PATH+ (Join-Path $pythonDir 'Scripts') >> $env:GITHUB_PATH+ $variable = if ($env:PYTHON_VERSION.EndsWith('t')) { 'PYTHON315T_EXECUTABLE' } else { 'PYTHON315_EXECUTABLE' }+ "$variable=$python" >> $env:GITHUB_ENV++ - if: ${{ runner.os == 'macOS' || (runner.os == 'Windows' && !(runner.arch == 'X64' && (inputs.version == '3.15' || inputs.version == '3.15t'))) || (runner.os == 'Linux' && steps.check_python.outputs.installed == 'false') }}name: Setup Python ${{ inputs.version }}uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0with:diff --git a/.github/dockerfiles/docker_tag b/.github/dockerfiles/docker_tagindex 64079a9b566..61cb5532c15 100644--- a/.github/dockerfiles/docker_tag+++ b/.github/dockerfiles/docker_tag@@ -1 +1 @@-pr-39323+pr-38649diff --git a/.github/dockerfiles/ov_build/fedora_29/Dockerfile b/.github/dockerfiles/ov_build/fedora_29/Dockerfiledeleted file mode 100644index 661dc4bfceb..00000000000--- a/.github/dockerfiles/ov_build/fedora_29/Dockerfile+++ /dev/null@@ -1,144 +0,0 @@-# Copyright (C) 2018-2026 Intel Corporation-# SPDX-License-Identifier: Apache-2.0--ARG REGISTRY="docker.io"-FROM ${REGISTRY}/library/fedora:29--USER root--# dnf configuration-RUN echo "timeout=60" >> /etc/dnf/dnf.conf && \- echo "retries=10" >> /etc/dnf/dnf.conf--# Hackity hack: Fedora 29 is out of support for so long now-# that we need to steal `ca-certificates` from Rocky Linux 8 repos-# to trust "storage.openvinotoolkit.org" again-RUN rpm -ihv --force https://download.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/Packages/c/ca-certificates-2025.2.80_v9.0.304-80.2.el8_10.noarch.rpm--RUN dnf update -y && dnf install -y \- git \- curl \- python3 \- # To build Python from source- openssl-devel \- sqlite-devel \- bzip2-devel \- libffi-devel \- zlib-devel \- wget \- make \- tar \- gcc \- gcc-c++ \- # parallel gzip- pigz \- xz--# Install build dependencies-ADD install_build_dependencies.sh /install_build_dependencies.sh-RUN chmod +x /install_build_dependencies.sh && \- bash -e /install_build_dependencies.sh && \- rm -rf /var/lib/apt/lists/*--# Build Pythons-# Python 3.11-RUN cd /usr/src && \- wget https://www.python.org/ftp/python/3.11.9/Python-3.11.9.tar.xz && \- tar xvf Python-3.11.9.tar.xz-RUN cd /usr/src/Python-3.11.9 && \- ./configure --enable-optimizations --enable-loadable-sqlite-extensions --prefix=/usr && \- make altinstall--# Python 3.12-RUN cd /usr/src && \- wget https://www.python.org/ftp/python/3.12.9/Python-3.12.9.tar.xz && \- tar xvf Python-3.12.9.tar.xz-RUN cd /usr/src/Python-3.12.9 && \- ./configure --enable-optimizations --enable-loadable-sqlite-extensions --prefix=/usr && \- make altinstall--# Python 3.13-RUN cd /usr/src && \- wget https://www.python.org/ftp/python/3.13.2/Python-3.13.2.tar.xz && \- tar xvf Python-3.13.2.tar.xz-RUN cd /usr/src/Python-3.13.2 && \- ./configure --enable-optimizations --enable-loadable-sqlite-extensions --prefix=/usr && \- make altinstall--# Python 3.14-RUN cd /usr/src && \- wget https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tgz && \- tar xzf Python-3.14.0.tgz-RUN cd /usr/src/Python-3.14.0 && \- ./configure --enable-optimizations --enable-loadable-sqlite-extensions --prefix=/usr && \- make altinstall--# Python 3.14 free-threading-RUN cp -r /usr/src/Python-3.14.0 /usr/src/Python-3.14t-RUN cd /usr/src/Python-3.14t && \- ./configure --disable-gil --enable-loadable-sqlite-extensions --prefix=/usr/python3.14t && \- make altinstall--RUN ln -s /usr/python3.14t/bin/python3.14t /usr/bin/python3.14t--# Install sscache-ARG SCCACHE_VERSION="v0.18.0"-ENV SCCACHE_HOME="/opt/sccache" \- SCCACHE_PATH="/opt/sccache/sccache"--RUN mkdir ${SCCACHE_HOME} && cd ${SCCACHE_HOME} && \- SCCACHE_ARCHIVE="sccache-${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz" && \- curl -SLO https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/${SCCACHE_ARCHIVE} && \- tar -xzf ${SCCACHE_ARCHIVE} --strip-components=1 && rm ${SCCACHE_ARCHIVE}--ENV PATH="$SCCACHE_HOME:$PATH"--# Use Python 3.11 as default-RUN python3.11 -m venv venv-ENV PATH="/venv/bin:$PATH"-RUN alternatives --install /usr/bin/python python /usr/bin/python3.11 11--# Setup pip-ENV PIP_VERSION="24.0"-RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \- python3.11 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \- python3.12 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \- python3.13 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \- python3.14 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \- python3.14t get-pip.py --no-cache-dir pip==${PIP_VERSION} && \- rm -f get-pip.py--# Install newer ninja (dnf ships older version lacking --quiet)-RUN python3 -m pip install --no-cache-dir ninja==1.13.0---# Install Node-ENV NODE_VERSION=22.23.2-ENV NVM_DIR=/.nvm-RUN mkdir -p $NVM_DIR-RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash-RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}-ENV PATH="$NVM_DIR/versions/node/v${NODE_VERSION}/bin/:${PATH}"--# To build git and curl from source-RUN dnf update -y && dnf install -y dh-autoreconf \- curl-devel \- expat-devel \- gettext-devel \- openssl-devel \- perl-devel \- zlib-devel \- libpsl-devel--# Build and install newer curl-RUN wget https://github.com/curl/curl/releases/download/curl-8_13_0/curl-8.13.0.tar.gz && \- tar -zxf curl-8.13.0.tar.gz-RUN cd curl-8.13.0 && \- ./configure --prefix=/usr --with-openssl && \- make install--# Build and install newer git-RUN wget -O git-2.49.0.tar.gz https://github.com/git/git/archive/refs/tags/v2.49.0.tar.gz && \- tar -zxf git-2.49.0.tar.gz-RUN cd git-2.49.0 && \- make configure && ./configure --prefix=/usr && make installdiff --git a/.github/dockerfiles/ov_build/ubuntu_22_04_arm64/Dockerfile b/.github/dockerfiles/ov_build/ubuntu_22_04_arm64/Dockerfileindex 78dd7e3175d..975bef201db 100644--- a/.github/dockerfiles/ov_build/ubuntu_22_04_arm64/Dockerfile+++ b/.github/dockerfiles/ov_build/ubuntu_22_04_arm64/Dockerfile@@ -47,6 +47,9 @@ RUN apt-get update && \python3.14-nogil \python3.14-venv \python3.14-dev \+ python3.15-nogil \+ python3.15-venv \+ python3.15-dev \libhdf5-dev \# For Java APIdefault-jdk \@@ -88,6 +91,8 @@ RUN mkdir ${SCCACHE_HOME} && cd ${SCCACHE_HOME} && \# Setup pipENV PIP_VERSION="24.0"+# pip 24.0 is incompatible with Python 3.15 (abstract importlib.metadata Distribution.locate_file)+ENV PIP_VERSION_PY315="26.2.1"RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \curl https://bootstrap.pypa.io/pip/3.8/get-pip.py -o get-pip-3-8.py && \curl https://bootstrap.pypa.io/pip/3.9/get-pip.py -o get-pip-3-9.py && \@@ -99,6 +104,8 @@ RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \python3.13 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \python3.14 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \python3.14t get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.15 get-pip.py --no-cache-dir pip==${PIP_VERSION_PY315} && \+ python3.15t get-pip.py --no-cache-dir pip==${PIP_VERSION_PY315} && \rm -f get-pip.py# Use Python 3.11 as default instead of Python 3.10diff --git a/.github/dockerfiles/ov_build/ubuntu_22_04_x64/Dockerfile b/.github/dockerfiles/ov_build/ubuntu_22_04_x64/Dockerfileindex 54db5c128fd..8eecc8ebd94 100644--- a/.github/dockerfiles/ov_build/ubuntu_22_04_x64/Dockerfile+++ b/.github/dockerfiles/ov_build/ubuntu_22_04_x64/Dockerfile@@ -39,6 +39,9 @@ RUN apt-get update && \python3.14-nogil \python3.14-venv \python3.14-dev \+ python3.15-nogil \+ python3.15-venv \+ python3.15-dev \# For Java APIdefault-jdk \# To build documentation@@ -79,6 +82,8 @@ ENV PATH="$SCCACHE_HOME:$PATH"# Setup pipENV PIP_VERSION="24.0"+# pip 24.0 is incompatible with Python 3.15 (abstract importlib.metadata Distribution.locate_file)+ENV PIP_VERSION_PY315="26.2.1"RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \python3 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \python3.11 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \@@ -86,6 +91,8 @@ RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \python3.13 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \python3.14 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \python3.14t get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.15 get-pip.py --no-cache-dir pip==${PIP_VERSION_PY315} && \+ python3.15t get-pip.py --no-cache-dir pip==${PIP_VERSION_PY315} && \rm -f get-pip.py# Use Python 3.11 as defaultdiff --git a/.github/dockerfiles/ov_build/ubuntu_24_04_x64/Dockerfile b/.github/dockerfiles/ov_build/ubuntu_24_04_x64/Dockerfileindex e5c4df4cbc8..957c3e019e3 100644--- a/.github/dockerfiles/ov_build/ubuntu_24_04_x64/Dockerfile+++ b/.github/dockerfiles/ov_build/ubuntu_24_04_x64/Dockerfile@@ -45,6 +45,9 @@ RUN apt-get update && \python3.14-nogil \python3.14-venv \python3.14-dev \+ python3.15-nogil \+ python3.15-venv \+ python3.15-dev \# For Java APIdefault-jdk \# For clang-tidy validation@@ -78,13 +81,17 @@ ENV PATH="/venv/bin:$PATH"# Setup pipENV PIP_VERSION="24.0"+# pip 24.0 is incompatible with Python 3.15 (abstract importlib.metadata Distribution.locate_file)+ENV PIP_VERSION_PY315="26.2.1"RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \/venv/bin/python3 -m pip install --upgrade pip==${PIP_VERSION} && \python3.11 -m pip install --upgrade pip==${PIP_VERSION} && \python3.12 -m pip install --upgrade pip==${PIP_VERSION} && \python3.13 -m pip install --upgrade pip==${PIP_VERSION} && \python3.14 -m pip install --upgrade pip==${PIP_VERSION} && \- python3.14t get-pip.py --no-cache-dir pip==${PIP_VERSION}+ python3.14t get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.15 get-pip.py --no-cache-dir --ignore-installed pip==${PIP_VERSION_PY315} && \+ python3.15t get-pip.py --no-cache-dir --ignore-installed pip==${PIP_VERSION_PY315}# Install newer ninja (apt ships 1.10.1 on 22.04 / 1.11.1 on 24.04; pin for consistency)RUN python3 -m pip install --no-cache-dir ninja==1.13.0diff --git a/.github/dockerfiles/ov_test/ubuntu_22_04_x64_py315/Dockerfile b/.github/dockerfiles/ov_test/ubuntu_22_04_x64_py315/Dockerfilenew file mode 100644index 00000000000..54c4f7d70de--- /dev/null+++ b/.github/dockerfiles/ov_test/ubuntu_22_04_x64_py315/Dockerfile@@ -0,0 +1,56 @@+# Copyright (C) 2018-2026 Intel Corporation+# SPDX-License-Identifier: Apache-2.0++ARG REGISTRY="docker.io"+FROM ${REGISTRY}/library/ubuntu:22.04++USER root++# APT configuration+RUN echo 'Acquire::Retries "10";' > /etc/apt/apt.conf && \+ echo 'APT::Get::Assume-Yes "true";' >> /etc/apt/apt.conf && \+ echo 'APT::Get::Fix-Broken "true";' >> /etc/apt/apt.conf && \+ echo 'APT::Get::no-install-recommends "true";' >> /etc/apt/apt.conf++ENV DEBIAN_FRONTEND="noninteractive" \+ TZ="Europe/London"++RUN apt-get update && \+ apt-get install software-properties-common && \+ add-apt-repository --yes --no-update ppa:git-core/ppa && \+ add-apt-repository --yes --no-update ppa:deadsnakes/ppa && \+ apt-get update && \+ apt-get install \+ curl \+ git \+ gpg-agent \+ tzdata \+ # parallel gzip+ pigz \+ # Python+ python3.15-dev \+ python3.15-venv \+ && \+ rm -rf /var/lib/apt/lists/*++# Install openvino dependencies+ADD scripts/install_dependencies/install_openvino_dependencies.sh /install_openvino_dependencies.sh+RUN chmod +x /install_openvino_dependencies.sh && \+ /install_openvino_dependencies.sh && \+ rm -rf /var/lib/apt/lists/*++# Setup pip+ENV PIP_VERSION="24.0"+# pip 24.0 is incompatible with Python 3.15 (abstract importlib.metadata Distribution.locate_file)+ENV PIP_VERSION_PY315="26.2.1"+RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \+ python3 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.15 get-pip.py --no-cache-dir pip==${PIP_VERSION_PY315} && \+ rm -f get-pip.py++# Use Python 3.15 as default instead of Python 3.10+# Using venv here 'cause other methods to switch the default Python on Ubuntu 22 break both system and wheels build+RUN python3.15 -m venv venv+ENV PATH="/venv/bin:$PATH"++ENV PIP_INSTALL_PATH=/venv/lib/python3.15/site-packagesdiff --git a/.github/dockerfiles/ov_test/ubuntu_22_04_x64_py315t/Dockerfile b/.github/dockerfiles/ov_test/ubuntu_22_04_x64_py315t/Dockerfilenew file mode 100644index 00000000000..7519979e561--- /dev/null+++ b/.github/dockerfiles/ov_test/ubuntu_22_04_x64_py315t/Dockerfile@@ -0,0 +1,57 @@+# Copyright (C) 2018-2026 Intel Corporation+# SPDX-License-Identifier: Apache-2.0++ARG REGISTRY="docker.io"+FROM ${REGISTRY}/library/ubuntu:22.04++USER root++# APT configuration+RUN echo 'Acquire::Retries "10";' > /etc/apt/apt.conf && \+ echo 'APT::Get::Assume-Yes "true";' >> /etc/apt/apt.conf && \+ echo 'APT::Get::Fix-Broken "true";' >> /etc/apt/apt.conf && \+ echo 'APT::Get::no-install-recommends "true";' >> /etc/apt/apt.conf++ENV DEBIAN_FRONTEND="noninteractive" \+ TZ="Europe/London"++RUN apt-get update && \+ apt-get install software-properties-common && \+ add-apt-repository --yes --no-update ppa:git-core/ppa && \+ add-apt-repository --yes --no-update ppa:deadsnakes/ppa && \+ apt-get update && \+ apt-get install \+ curl \+ git \+ gpg-agent \+ tzdata \+ # parallel gzip+ pigz \+ # Python+ python3.15-nogil \+ python3.15-venv \+ python3.15-dev \+ && \+ rm -rf /var/lib/apt/lists/*++# Install openvino dependencies+ADD scripts/install_dependencies/install_openvino_dependencies.sh /install_openvino_dependencies.sh+RUN chmod +x /install_openvino_dependencies.sh && \+ /install_openvino_dependencies.sh && \+ rm -rf /var/lib/apt/lists/*++# Setup pip+ENV PIP_VERSION="24.0"+# pip 24.0 is incompatible with Python 3.15 (abstract importlib.metadata Distribution.locate_file)+ENV PIP_VERSION_PY315="26.2.1"+RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \+ python3 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.15t get-pip.py --no-cache-dir pip==${PIP_VERSION_PY315} && \+ rm -f get-pip.py++# Use Python 3.15 free-threading as default instead of Python 3.10+# Using venv here 'cause other methods to switch the default Python on Ubuntu 22 break both system and wheels build+RUN python3.15t -m venv venv+ENV PATH="/venv/bin:$PATH"++ENV PIP_INSTALL_PATH=/venv/lib/python3.15t/site-packagesdiff --git a/.github/workflows/job_build_linux.yml b/.github/workflows/job_build_linux.ymlindex 1b5ac3ea57b..75b99231803 100644--- a/.github/workflows/job_build_linux.yml+++ b/.github/workflows/job_build_linux.yml@@ -52,7 +52,7 @@ on:required: falsedefault: falsebuild-additional-python-packages:- description: 'Whether to build additional, i.e., non-system Python packages. Should have Python 3.11-3.13 installed'+ description: 'Whether to build additional, i.e., non-system Python packages. Should have Python 3.11-3.15t installed'type: booleanrequired: falsedefault: false@@ -302,7 +302,7 @@ jobs:id: build_python_wheelsif: ${{ inputs.build-additional-python-packages }}run: |- for py_version in "3.11" "3.12" "3.13" "3.14" "3.14t"+ for py_version in "3.11" "3.12" "3.13" "3.14" "3.14t" "3.15" "3.15t"doecho "Building Python API and wheels for Python ${py_version}"export PY_BUILD_DIR=${{ github.workspace }}/py$py_version@@ -319,7 +319,7 @@ jobs:CMAKE_OPTIONS+=" -DCMAKE_TOOLCHAIN_FILE=${{ env.OPENVINO_REPO }}/cmake/arm.toolchain.cmake -DPYTHON_MODULE_EXTENSION=$(/opt/python${py_version}_arm/bin/python${py_version}-config --extension-suffix) -DPython3_INCLUDE_DIR=/opt/python${py_version}_arm/include/python${py_version}"fi- if [[ $py_version == "3.14t" ]]; then+ if [[ $py_version == *t ]]; thenCMAKE_OPTIONS+=" -DENABLE_GIL_PYTHON_API=OFF"fidiff --git a/.github/workflows/job_build_windows.yml b/.github/workflows/job_build_windows.ymlindex 49cb7f332ac..4c76c923f5d 100644--- a/.github/workflows/job_build_windows.yml+++ b/.github/workflows/job_build_windows.yml@@ -22,7 +22,7 @@ on:type: stringrequired: truebuild-additional-python-wheels:- description: 'Whether to build additional, i.e., non-system Python wheels. Should have Python 3.11-3.13 installed'+ description: 'Whether to build additional, i.e., non-system Python wheels. Should have Python 3.11-3.15t installed'type: booleanrequired: falsedefault: false@@ -242,16 +242,30 @@ jobs:set-pip-install-path: 'true'self-hosted-runner: 'true'+ # Setup additional Python versions for wheels building+ - name: Setup Python 3.15+ if: ${{ inputs.build-additional-python-wheels }}+ uses: ./openvino/.github/actions/setup_python+ with:+ version: '3.15'+ use-pip-proxy: 'true'+ set-pip-install-path: 'true'+ self-hosted-runner: 'true'+- name: Build additional Python wheelsif: ${{ inputs.build-additional-python-wheels }}run: |- $pyVersions = '3.11', '3.12', '3.13', '3.14'+ $pyVersions = '3.11', '3.12', '3.13', '3.14', '3.15'foreach ($pyVersion in $pyVersions) {$pyBuildDir = "${{ github.workspace }}/py$pyVersion"New-Item -ItemType Directory -Path "$pyBuildDir" -Force- $pythonCommand = "py -$pyVersion -c `"import sys; print(f'{sys.executable}')`""- $pythonExecutablePath = & cmd /c $pythonCommand+ if ($pyVersion -eq '3.15') {+ $pythonExecutablePath = $env:PYTHON315_EXECUTABLE+ } else {+ $pythonCommand = "py -$pyVersion -c `"import sys; print(f'{sys.executable}')`""+ $pythonExecutablePath = & cmd /c $pythonCommand+ }Write-Host "Building Python wheels for Python $pyVersion located at $pythonExecutablePath"@@ -285,28 +299,45 @@ jobs:self-hosted-runner: 'true'allow-prereleases: 'true'- - name: Build additional Python wheels - Python 3.14t+ # Setup additional Python versions for wheels building+ - name: Setup Python 3.15t+ if: ${{ inputs.build-additional-python-wheels }}+ uses: ./openvino/.github/actions/setup_python+ with:+ version: '3.15t'+ use-pip-proxy: 'true'+ set-pip-install-path: 'true'+ self-hosted-runner: 'true'+ allow-prereleases: 'true'++ - name: Build additional Python wheels - free-threaded Pythonif: ${{ inputs.build-additional-python-wheels }}run: |- $pyVersion = '3.14t'- $pyBuildDir = "${{ github.workspace }}/py$pyVersion"- New-Item -ItemType Directory -Path "$pyBuildDir" -Force+ $pyVersions = '3.14t', '3.15t'+ foreach ($pyVersion in $pyVersions) {+ $pyBuildDir = "${{ github.workspace }}/py$pyVersion"+ New-Item -ItemType Directory -Path "$pyBuildDir" -Force- $pythonCommand = "py -$pyVersion -c `"import sys; print(f'{sys.executable}')`""- $pythonExecutablePath = & cmd /c $pythonCommand+ if ($pyVersion -eq '3.15t') {+ $pythonExecutablePath = $env:PYTHON315T_EXECUTABLE+ } else {+ $pythonCommand = "py -$pyVersion -c `"import sys; print(f'{sys.executable}')`""+ $pythonExecutablePath = & cmd /c $pythonCommand+ }- Write-Host "Building Python wheels for Python $pyVersion located at $pythonExecutablePath"+ Write-Host "Building Python wheels for Python $pyVersion located at $pythonExecutablePath"- & $pythonExecutablePath -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt+ & $pythonExecutablePath -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt- cmake -DPython3_EXECUTABLE="$pythonExecutablePath" -DENABLE_GIL_PYTHON_API=OFF -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B "$pyBuildDir"+ cmake -DPython3_EXECUTABLE="$pythonExecutablePath" -DENABLE_GIL_PYTHON_API=OFF -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B "$pyBuildDir"- cmake --build "$pyBuildDir" --parallel $env:CMAKE_BUILD_PARALLEL_LEVEL --target ie_wheel --config ${{ env.CMAKE_BUILD_TYPE }} -- --quiet &&- cmake --install "$pyBuildDir" --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheels &&- cmake --install "$pyBuildDir" --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_DIR }} --component pyopenvino_python$pyVersion- if ($LASTEXITCODE -ne 0) {- Write-Host "Failed to build Python wheels for Python $pyVersion"- exit 1+ cmake --build "$pyBuildDir" --parallel $env:CMAKE_BUILD_PARALLEL_LEVEL --target ie_wheel --config ${{ env.CMAKE_BUILD_TYPE }} -- --quiet &&+ cmake --install "$pyBuildDir" --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheels &&+ cmake --install "$pyBuildDir" --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_DIR }} --component pyopenvino_python$pyVersion+ if ($LASTEXITCODE -ne 0) {+ Write-Host "Failed to build Python wheels for Python $pyVersion"+ exit 1+ }}env:CMAKE_GENERATOR: 'Ninja' # Ninja is the only Windows native generator supported by ccachediff --git a/.github/workflows/job_python_api_tests.yml b/.github/workflows/job_python_api_tests.ymlindex 155da5f574a..a1aeacf17f2 100644--- a/.github/workflows/job_python_api_tests.yml+++ b/.github/workflows/job_python_api_tests.yml@@ -111,7 +111,7 @@ jobs:--ignore=${INSTALL_TEST_DIR}/pyopenvino/tests/test_utils/test_utils.py- name: Python API Tests -- numpy<2.0.0- if: ${{ fromJSON(inputs.affected-components).Python_API.test && inputs.python-version != '3.14t' }} # Explanation for `3.14t` is in the 178162 ticket+ if: ${{ fromJSON(inputs.affected-components).Python_API.test && inputs.python-version != '3.14t' && inputs.python-version != '3.15' && inputs.python-version != '3.15t' }} # Explanation for `3.14t` is in the 178162 ticket; numpy 1.26 has no Python 3.15 wheelsrun: |python3 -m pip uninstall -y numpypython3 -m pip install "numpy~=1.26.0"@@ -123,7 +123,7 @@ jobs:--ignore=${INSTALL_TEST_DIR}/pyopenvino/tests/test_utils/test_utils.py- name: Docs Python snippets- if: ${{ runner.os != 'macOS' && fromJSON(inputs.affected-components).docs_snippets.test && inputs.python-version != '3.14' && inputs.python-version != '3.14t' }} # Ticket: 178163+ if: ${{ runner.os != 'macOS' && fromJSON(inputs.affected-components).docs_snippets.test && inputs.python-version != '3.14' && inputs.python-version != '3.14t' && inputs.python-version != '3.15' && inputs.python-version != '3.15t' }} # Ticket: 178163run: |# torch, onnxpython3 -m pip install -r ${INSTALL_TEST_DIR}/python/preprocess/torchvision/requirements.txt -r ${INSTALL_TEST_DIR}/requirements_onnxdiff --git a/.github/workflows/mac_arm64.yml b/.github/workflows/mac_arm64.ymlindex b7aa4845023..a64cd551c91 100644--- a/.github/workflows/mac_arm64.yml+++ b/.github/workflows/mac_arm64.yml@@ -262,9 +262,24 @@ jobs:set-pip-install-path: 'false'self-hosted-runner: 'false'- - name: Build additional Python wheels (3.11-3.14t)+ - name: Setup Python 3.15t+ uses: ./openvino/.github/actions/setup_python+ with:+ version: "3.15t"+ set-pip-install-path: 'false'+ self-hosted-runner: 'false'+ allow-prereleases: 'true'++ - name: Setup Python 3.15+ uses: ./openvino/.github/actions/setup_python+ with:+ version: "3.15"+ set-pip-install-path: 'false'+ self-hosted-runner: 'false'++ - name: Build additional Python wheels (3.11-3.15t)run: |- for py_version in "3.11" "3.12" "3.13" "3.14" "3.14t"+ for py_version in "3.11" "3.12" "3.13" "3.14" "3.14t" "3.15" "3.15t"doecho "Building Python API and wheels for Python ${py_version}"python_exec_path=$(python$py_version -c "import sys; print(sys.executable)")@@ -272,7 +287,7 @@ jobs:echo "Using Python executable at: ${python_exec_path}"- if [[ $py_version == "3.14t" ]]; then+ if [[ $py_version == *t ]]; thengil_option="-DENABLE_GIL_PYTHON_API=OFF"elsegil_option=""@@ -442,7 +457,7 @@ jobs:strategy:fail-fast: falsematrix:- python-version: [ '3.11', '3.12', '3.13', '3.14', '3.14t' ]+ python-version: [ '3.11', '3.12', '3.13', '3.14', '3.14t', '3.15', '3.15t' ]with:runner: 'macos-15'affected-components: ${{ needs.smart_ci.outputs.affected_components }}diff --git a/.github/workflows/manylinux_2_28.yml b/.github/workflows/manylinux_2_28.ymlindex 9e749633535..32fe99493c5 100644--- a/.github/workflows/manylinux_2_28.yml+++ b/.github/workflows/manylinux_2_28.yml@@ -71,7 +71,7 @@ jobs:- name: Set mock output images if pipeline should be skippedif: ${{ needs.smart_ci.outputs.skip_workflow == 'True' }}id: mock_image- run: echo "images={\"ov_test\":{\"ubuntu_22_04_x64_py313\":\"mock\"},\"ov_test\":{\"ubuntu_22_04_x64\":\"mock\"},\"ov_test\":{\"ubuntu_22_04_x64_py314\":\"mock\"},\"ov_test\":{\"ubuntu_24_04_x64\":\"mock\"},\"ov_test\":{\"fedora_33\":\"mock\"},\"ov_build\":{\"manylinux_2_28\":\"mock\"}}" >> "$GITHUB_OUTPUT"+ run: echo "images={\"ov_test\":{\"ubuntu_22_04_x64_py313\":\"mock\"},\"ov_test\":{\"ubuntu_22_04_x64\":\"mock\"},\"ov_test\":{\"ubuntu_22_04_x64_py314\":\"mock\"},\"ov_test\":{\"ubuntu_22_04_x64_py315\":\"mock\"},\"ov_test\":{\"ubuntu_22_04_x64_py315t\":\"mock\"},\"ov_test\":{\"ubuntu_24_04_x64\":\"mock\"},\"ov_test\":{\"fedora_33\":\"mock\"},\"ov_build\":{\"manylinux_2_28\":\"mock\"}}" >> "$GITHUB_OUTPUT"- name: Checkoutif: ${{ needs.smart_ci.outputs.skip_workflow != 'True' }}@@ -88,6 +88,8 @@ jobs:ov_test/ubuntu_22_04_x64ov_test/ubuntu_22_04_x64_py314ov_test/ubuntu_22_04_x64_py314t+ ov_test/ubuntu_22_04_x64_py315+ ov_test/ubuntu_22_04_x64_py315tov_test/ubuntu_24_04_x64ov_test/fedora_33registry: 'openvinogithubactions.azurecr.io'@@ -204,23 +206,23 @@ jobs:env:CXXFLAGS: "-Wno-dangling-reference" # bug in gcc-14: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107532- - name: Build Python API (Python 3.11-3.14t)+ - name: Build Python API (Python 3.11-3.15t)run: |- SUPPORTED_PYTHON_VERSIONS=("3.11" "3.12" "3.13" "3.14" "3.14t")+ SUPPORTED_PYTHON_VERSIONS=("3.11" "3.12" "3.13" "3.14" "3.14t" "3.15" "3.15t")for PY_VER in "${SUPPORTED_PYTHON_VERSIONS[@]}"; dopy_build_dir=${{ github.workspace }}/build_py${PY_VER}- simpler_python_version=$(echo $PY_VER | sed -e 's/\.//g')+ simpler_python_version=$(echo $PY_VER | sed -e 's/\.//g' -e 's/t$//')- if [ "$PY_VER" == "3.14t" ]; then- python_path=/opt/python/cp314-cp314t/bin/python3+ if [[ $PY_VER == *t ]]; then+ python_path=/opt/python/cp${simpler_python_version}-cp${simpler_python_version}t/bin/python3elsepython_path=/opt/python/cp${simpler_python_version}-cp${simpler_python_version}/bin/python3fi${python_path} -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt- if [[ $PY_VER == "3.14t" ]]; then+ if [[ $PY_VER == *t ]]; then/usr/bin/cmake -DPython3_EXECUTABLE=${python_path} -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -DENABLE_GIL_PYTHON_API=OFF -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B ${py_build_dir}else/usr/bin/cmake -DPython3_EXECUTABLE=${python_path} -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B ${py_build_dir}@@ -332,6 +334,10 @@ jobs:image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_22_04_x64_py314 }}- python-version: "3.14t"image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_22_04_x64_py314t }}+ - python-version: "3.15"+ image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_22_04_x64_py315 }}+ - python-version: "3.15t"+ image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_22_04_x64_py315t }}with:runner: 'aks-linux-4-cores-16gb'image: ${{ matrix.image }}diff --git a/.github/workflows/windows_vs2022_release.yml b/.github/workflows/windows_vs2022_release.ymlindex bdc6b653ebc..0ca2d6f1d76 100644--- a/.github/workflows/windows_vs2022_release.yml+++ b/.github/workflows/windows_vs2022_release.yml@@ -430,7 +430,8 @@ jobs:strategy:fail-fast: falsematrix:- python-version: ["3.11", "3.12", "3.13", "3.14", "3.14t"]+ # 3.15t fails with `Windows fatal exception: access violation`+ python-version: ["3.11", "3.12", "3.13", "3.14", "3.14t", "3.15"]defaults:run:shell: pwsh@@ -441,6 +442,7 @@ jobs:INSTALL_TEST_DIR: "${{ github.workspace }}\\install\\tests"INSTALL_WHEELS_DIR: "${{ github.workspace }}\\install\\wheels"PYTHON_STATIC_ARGS: -m "not dynamic_library and not template_plugin"+ PYYAML_FORCE_LIBYAML: ${{ (matrix.python-version == '3.15' || matrix.python-version == '3.15t') && '0' || '' }} # pyYAML does not have Python 3.15 wheelssteps:- name: Download OpenVINO artifacts (tarballs)uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main@@ -495,6 +497,7 @@ jobs:python3 -m pytest -sv ${{ env.INSTALL_TEST_DIR }}/pyopenvino ${{ env.PYTHON_STATIC_ARGS }} --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-Pyngraph.xml --ignore=${{ env.INSTALL_TEST_DIR }}/pyopenvino/tests/test_utils/test_utils.py- name: Python API Tests -- numpy>=2.0.0+ if: ${{ matrix.python-version != '3.15' && matrix.python-version != '3.15t' }} # numpy<2.1 has no Python 3.15 wheelsshell: cmdrun: |python3 -m pip uninstall -y numpy@@ -739,7 +742,7 @@ jobs:Overall_Status:name: ci/gha_overall_status_windows- needs: [ Smart_CI, Build, Samples, CXX_Unit_Tests, Python_Unit_Tests, CPU_Functional_Tests, Openvino_tokenizers, TensorFlow_Layer_Tests, Pytorch_Layer_Tests, JS_API, NPU_Models_Tests ]+ needs: [ Smart_CI, Build, Samples, CXX_Unit_Tests, Python_Unit_Tests, Python_API_Tests, CPU_Functional_Tests, Openvino_tokenizers, TensorFlow_Layer_Tests, Pytorch_Layer_Tests, JS_API, NPU_Models_Tests ]if: ${{ always() }}runs-on: ubuntu-lateststeps:diff --git a/docs/dev/ci/github_actions/custom_actions.md b/docs/dev/ci/github_actions/custom_actions.mdindex 1cbc86c6119..e668f8b99ef 100644--- a/docs/dev/ci/github_actions/custom_actions.md+++ b/docs/dev/ci/github_actions/custom_actions.md@@ -28,6 +28,11 @@ Under the hood it uses the GitHub-provided `actions/setup-python`, and communitySince `actions/setup-python` does not work on the Linux ARM64 machines,`deadsnakes-action` is used instead.+On Windows x64, Python 3.15 and 3.15t use the official CPython NuGet packages,+pinned to 3.15.2, to avoid the machine-wide installer. The action adds the selected+interpreter to `PATH` and exports `PYTHON315_EXECUTABLE` or `PYTHON315T_EXECUTABLE`+for builds that need explicit paths; these installs are not registered with `py`.+### Usage```yaml- name: Setup Python ${{ env.PYTHON_VERSION }}