Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[PyOV] Skip some tests failing on experimental free-threaded Python (#31586)

Przemyslaw Wysocki24468f8b3b50
diff --git a/src/bindings/python/tests/test_graph/test_custom_op.py b/src/bindings/python/tests/test_graph/test_custom_op.py
index 9d80c34e3bf..31fb8f5c937 100644
--- a/src/bindings/python/tests/test_graph/test_custom_op.py
+++ b/src/bindings/python/tests/test_graph/test_custom_op.py
@@ -14,6 +14,7 @@ from openvino import DiscreteTypeInfo
import openvino.opset14 as ops
from tests.utils.helpers import create_filenames_for_ir, compare_models
+import sysconfig
class CustomOp(Op):
@@ -138,6 +139,7 @@ def prepared_paths(request, tmp_path):
({"wrong_np": np.array([1.5, 2.5], dtype="complex128")}, pytest.raises(TypeError), "Unsupported NumPy array dtype: complex128"),
({"wrong": {}}, pytest.raises(TypeError), "Unsupported attribute type: <class 'dict'>")
])
[email protected](sysconfig.get_config_var("Py_GIL_DISABLED"), reason="Ticket: 171534")
def test_visit_attributes_custom_op(device, prepared_paths, attributes, expectation, raise_msg):
input_shape = [2, 1]
@@ -197,6 +199,7 @@ def test_custom_add_model():
assert op_types == ["Parameter", "Parameter", "CustomAdd", "Result"]
[email protected](sysconfig.get_config_var("Py_GIL_DISABLED"), reason="Ticket: 171534")
def test_custom_op(device):
model = create_snake_model()
compiled_model = compile_model(model, device)
diff --git a/src/bindings/python/tests/test_runtime/test_async_infer_request.py b/src/bindings/python/tests/test_runtime/test_async_infer_request.py
index 2a66552facc..54a547878f1 100644
--- a/src/bindings/python/tests/test_runtime/test_async_infer_request.py
+++ b/src/bindings/python/tests/test_runtime/test_async_infer_request.py
@@ -7,6 +7,7 @@ from copy import deepcopy
import numpy as np
import pytest
import time
+import sysconfig
import openvino.opset13 as ops
from openvino import (
@@ -27,6 +28,7 @@ from tests.utils.helpers import (
)
[email protected](sysconfig.get_config_var("Py_GIL_DISABLED"), reason="Ticket: 171534")
@pytest.mark.parametrize("share_inputs", [True, False])
def test_infer_queue(device, share_inputs):
jobs = 8
@@ -93,6 +95,7 @@ def test_infer_queue_userdata_is_empty_more_jobs(device):
assert infer_queue.userdata == [None, None, None, None, None]
[email protected](sysconfig.get_config_var("Py_GIL_DISABLED"), reason="Ticket: 171534")
def test_infer_queue_fail_on_cpp_model(device):
jobs = 6
num_request = 4
@@ -115,6 +118,7 @@ def test_infer_queue_fail_on_cpp_model(device):
assert "Port for tensor name Unknown was not found" in str(e.value)
[email protected](sysconfig.get_config_var("Py_GIL_DISABLED"), reason="Ticket: 171534")
def test_infer_queue_fail_on_py_model(device):
jobs = 1
num_request = 1
@@ -189,6 +193,7 @@ def test_infer_queue_get_idle_handle(device):
@pytest.mark.parametrize("share_inputs", [True, False])
[email protected](sysconfig.get_config_var("Py_GIL_DISABLED"), reason="Ticket: 171534")
def test_results_async_infer(device, share_inputs):
jobs = 8
num_request = 4
@@ -283,6 +288,7 @@ def test_cancel(device):
assert "[ INFER_CANCELLED ]" in str(e.value)
[email protected](sysconfig.get_config_var("Py_GIL_DISABLED"), reason="Ticket: 171534")
@pytest.mark.parametrize("share_inputs", [True, False])
def test_start_async(device, share_inputs):
core = Core()
diff --git a/src/bindings/python/tests/test_runtime/test_deprecated_runtime.py b/src/bindings/python/tests/test_runtime/test_deprecated_runtime.py
index 7885268b014..51a2a1e11a3 100644
--- a/src/bindings/python/tests/test_runtime/test_deprecated_runtime.py
+++ b/src/bindings/python/tests/test_runtime/test_deprecated_runtime.py
@@ -8,6 +8,7 @@ from pathlib import Path
from contextlib import nullcontext as does_not_raise
import warnings
import operator
+import sysconfig
with pytest.warns(DeprecationWarning, match="The `openvino.runtime` module is deprecated and will be removed in the 2026.0 release."):
import openvino.runtime as ov
@@ -167,6 +168,7 @@ def test_output_replace():
assert res.input_value(0).get_node() == exp
[email protected](sysconfig.get_config_var("Py_GIL_DISABLED"), reason="Ticket: 171534")
@pytest.mark.parametrize("share_inputs", [True, False])
def test_infer_queue(device, share_inputs):
jobs = 8
diff --git a/src/bindings/python/wheel/fdupes_check.cmake b/src/bindings/python/wheel/fdupes_check.cmake
index 782c2d6dc0f..fa3216c36cf 100644
--- a/src/bindings/python/wheel/fdupes_check.cmake
+++ b/src/bindings/python/wheel/fdupes_check.cmake
@@ -8,6 +8,13 @@ foreach(var Python3_EXECUTABLE WORKING_DIRECTORY REPORT_FILE WHEEL_VERSION PACKA
endif()
endforeach()
+get_filename_component(wheel_name "${PACKAGE_FILE}" NAME)
+if(wheel_name MATCHES ".*cp313t.*")
+ message(STATUS "Skipping duplicate file check for Python 3.13t. Ticket: 171533")
+ file(WRITE "${REPORT_FILE}" "")
+ return()
+endif()
+
# find programs
find_program(fdupes_PROGRAM NAMES fdupes DOC "Path to fdupes")