From a19c34a0f73bb718b83374ac8a34bf6569e20e9a Mon Sep 17 00:00:00 2001 From: Jan Iwaszkiewicz Date: Mon, 22 Apr 2024 15:47:49 +0200 Subject: [PATCH] [PyOV] Limit numpy to major version (#24103) ### Details: Numpy started preparation to release 2.0 version. It brings many breaking changes listed below. Align with these changes it's a plan for further development (CVS-138766), for today we want to secure users against unintentional installation of 2.x version of numpy with OV. This PR has to be ported for 2024/1 branch - Preparing to restrict OV to not use release of Numpy 2.0 which may introduce many breaking changes including: - required bump of `pybind` to 2.12+ - API and namespaces clean-ups and deprecations - behavior changes of keywords such as `copy` - changes to existing and introduction of new dtypes (such as `StringDType` and possibility of adding custom ones) - more can be found here: https://numpy.org/devdocs/release/2.0.0-notes.html - and here: https://numpy.org/devdocs/numpy_2_0_migration_guide.html#numpy-2-migration-guide ### Tickets: - CVS-138838 --------- Co-authored-by: Michal Lukaszewski --- src/bindings/python/requirements.txt | 2 +- tools/benchmark_tool/requirements.txt | 2 +- tools/mo/requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bindings/python/requirements.txt b/src/bindings/python/requirements.txt index 8d74e89d548..9aba9800ac1 100644 --- a/src/bindings/python/requirements.txt +++ b/src/bindings/python/requirements.txt @@ -1,3 +1,3 @@ -numpy>=1.16.6 +numpy>=1.16.6,<2.0.0 openvino-telemetry>=2023.2.1 packaging diff --git a/tools/benchmark_tool/requirements.txt b/tools/benchmark_tool/requirements.txt index 27c8e198ca9..0d79dcbb03b 100644 --- a/tools/benchmark_tool/requirements.txt +++ b/tools/benchmark_tool/requirements.txt @@ -1,2 +1,2 @@ -c ../constraints.txt -numpy>=1.16.6 +numpy>=1.16.6,<2.0.0 diff --git a/tools/mo/requirements.txt b/tools/mo/requirements.txt index e667941407b..efc6bc8e1bc 100644 --- a/tools/mo/requirements.txt +++ b/tools/mo/requirements.txt @@ -1,5 +1,5 @@ -c ../constraints.txt -numpy>=1.16.6 +numpy>=1.16.6,<2.0.0 importlib-metadata; python_version < "3.8" and sys_platform == "win32" networkx defusedxml