diff --git a/src/bindings/python/src/openvino/__init__.py b/src/bindings/python/src/openvino/__init__.py index 07984dbb611508..873a686076f262 100644 --- a/src/bindings/python/src/openvino/__init__.py +++ b/src/bindings/python/src/openvino/__init__.py @@ -101,12 +101,6 @@ Node.__rmul__ = lambda left, right: opset13.multiply(right, left) Node.__rdiv__ = lambda left, right: opset13.divide(right, left) Node.__rtruediv__ = lambda left, right: opset13.divide(right, left) -Node.__eq__ = utils.deprecated(version="2025.3", message="Use ops.equal instead")(opset13.equal) -Node.__ne__ = utils.deprecated(version="2025.3", message="Use ops.not_equal instead")(opset13.not_equal) -Node.__lt__ = utils.deprecated(version="2025.3", message="Use ops.less instead")(opset13.less) -Node.__le__ = utils.deprecated(version="2025.3", message="Use ops.less_equal instead")(opset13.less_equal) -Node.__gt__ = utils.deprecated(version="2025.3", message="Use ops.greater instead")(opset13.greater) -Node.__ge__ = utils.deprecated(version="2025.3", message="Use ops.greater_equal instead")(opset13.greater_equal) # libva related: from openvino._pyopenvino import VAContext diff --git a/src/bindings/python/src/openvino/runtime/__init__.py b/src/bindings/python/src/openvino/runtime/__init__.py index 9248778637e8e9..924d94c57bd280 100644 --- a/src/bindings/python/src/openvino/runtime/__init__.py +++ b/src/bindings/python/src/openvino/runtime/__init__.py @@ -68,3 +68,13 @@ # Helper functions for openvino module from openvino.runtime.ie_api import tensor_from_file from openvino.runtime.ie_api import compile_model + +from openvino.utils import deprecated + +# Extend Node class to support binary operators +Node.__eq__ = deprecated(version="2025.3", message="Use ops.equal instead")(opset13.equal) +Node.__ne__ = deprecated(version="2025.3", message="Use ops.not_equal instead")(opset13.not_equal) +Node.__lt__ = deprecated(version="2025.3", message="Use ops.less instead")(opset13.less) +Node.__le__ = deprecated(version="2025.3", message="Use ops.less_equal instead")(opset13.less_equal) +Node.__gt__ = deprecated(version="2025.3", message="Use ops.greater instead")(opset13.greater) +Node.__ge__ = deprecated(version="2025.3", message="Use ops.greater_equal instead")(opset13.greater_equal) diff --git a/tools/benchmark_tool/openvino/__init__.py b/tools/benchmark_tool/openvino/__init__.py index 07984dbb611508..873a686076f262 100644 --- a/tools/benchmark_tool/openvino/__init__.py +++ b/tools/benchmark_tool/openvino/__init__.py @@ -101,12 +101,6 @@ Node.__rmul__ = lambda left, right: opset13.multiply(right, left) Node.__rdiv__ = lambda left, right: opset13.divide(right, left) Node.__rtruediv__ = lambda left, right: opset13.divide(right, left) -Node.__eq__ = utils.deprecated(version="2025.3", message="Use ops.equal instead")(opset13.equal) -Node.__ne__ = utils.deprecated(version="2025.3", message="Use ops.not_equal instead")(opset13.not_equal) -Node.__lt__ = utils.deprecated(version="2025.3", message="Use ops.less instead")(opset13.less) -Node.__le__ = utils.deprecated(version="2025.3", message="Use ops.less_equal instead")(opset13.less_equal) -Node.__gt__ = utils.deprecated(version="2025.3", message="Use ops.greater instead")(opset13.greater) -Node.__ge__ = utils.deprecated(version="2025.3", message="Use ops.greater_equal instead")(opset13.greater_equal) # libva related: from openvino._pyopenvino import VAContext diff --git a/tools/mo/openvino/__init__.py b/tools/mo/openvino/__init__.py index 07984dbb611508..873a686076f262 100644 --- a/tools/mo/openvino/__init__.py +++ b/tools/mo/openvino/__init__.py @@ -101,12 +101,6 @@ Node.__rmul__ = lambda left, right: opset13.multiply(right, left) Node.__rdiv__ = lambda left, right: opset13.divide(right, left) Node.__rtruediv__ = lambda left, right: opset13.divide(right, left) -Node.__eq__ = utils.deprecated(version="2025.3", message="Use ops.equal instead")(opset13.equal) -Node.__ne__ = utils.deprecated(version="2025.3", message="Use ops.not_equal instead")(opset13.not_equal) -Node.__lt__ = utils.deprecated(version="2025.3", message="Use ops.less instead")(opset13.less) -Node.__le__ = utils.deprecated(version="2025.3", message="Use ops.less_equal instead")(opset13.less_equal) -Node.__gt__ = utils.deprecated(version="2025.3", message="Use ops.greater instead")(opset13.greater) -Node.__ge__ = utils.deprecated(version="2025.3", message="Use ops.greater_equal instead")(opset13.greater_equal) # libva related: from openvino._pyopenvino import VAContext diff --git a/tools/openvino_dev/src/openvino/__init__.py b/tools/openvino_dev/src/openvino/__init__.py index 07984dbb611508..873a686076f262 100644 --- a/tools/openvino_dev/src/openvino/__init__.py +++ b/tools/openvino_dev/src/openvino/__init__.py @@ -101,12 +101,6 @@ Node.__rmul__ = lambda left, right: opset13.multiply(right, left) Node.__rdiv__ = lambda left, right: opset13.divide(right, left) Node.__rtruediv__ = lambda left, right: opset13.divide(right, left) -Node.__eq__ = utils.deprecated(version="2025.3", message="Use ops.equal instead")(opset13.equal) -Node.__ne__ = utils.deprecated(version="2025.3", message="Use ops.not_equal instead")(opset13.not_equal) -Node.__lt__ = utils.deprecated(version="2025.3", message="Use ops.less instead")(opset13.less) -Node.__le__ = utils.deprecated(version="2025.3", message="Use ops.less_equal instead")(opset13.less_equal) -Node.__gt__ = utils.deprecated(version="2025.3", message="Use ops.greater instead")(opset13.greater) -Node.__ge__ = utils.deprecated(version="2025.3", message="Use ops.greater_equal instead")(opset13.greater_equal) # libva related: from openvino._pyopenvino import VAContext diff --git a/tools/ovc/openvino/__init__.py b/tools/ovc/openvino/__init__.py index 07984dbb611508..873a686076f262 100644 --- a/tools/ovc/openvino/__init__.py +++ b/tools/ovc/openvino/__init__.py @@ -101,12 +101,6 @@ Node.__rmul__ = lambda left, right: opset13.multiply(right, left) Node.__rdiv__ = lambda left, right: opset13.divide(right, left) Node.__rtruediv__ = lambda left, right: opset13.divide(right, left) -Node.__eq__ = utils.deprecated(version="2025.3", message="Use ops.equal instead")(opset13.equal) -Node.__ne__ = utils.deprecated(version="2025.3", message="Use ops.not_equal instead")(opset13.not_equal) -Node.__lt__ = utils.deprecated(version="2025.3", message="Use ops.less instead")(opset13.less) -Node.__le__ = utils.deprecated(version="2025.3", message="Use ops.less_equal instead")(opset13.less_equal) -Node.__gt__ = utils.deprecated(version="2025.3", message="Use ops.greater instead")(opset13.greater) -Node.__ge__ = utils.deprecated(version="2025.3", message="Use ops.greater_equal instead")(opset13.greater_equal) # libva related: from openvino._pyopenvino import VAContext