Introduce deprecation warnings for `supervision.keypoint` module, redirecting to `supervision.key_points`.

(cherry picked from commit 99e772c466)
This commit is contained in:
jirka 2026-01-27 15:40:48 +01:00 committed by Jirka Borovec
parent 565cd919e9
commit 845e47f472
3 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,15 @@
import warnings
warnings.warn(
"The 'supervision.keypoint' module is deprecated in `0.27.0` and will be removed "
"in `0.30.0`. Please use 'supervision.key_points' instead.",
DeprecationWarning,
stacklevel=2,
)
from supervision.key_points.annotators import ( # noqa: F401
EdgeAnnotator,
VertexAnnotator,
VertexLabelAnnotator,
)
from supervision.key_points.core import KeyPoints # noqa: F401

View File

@ -0,0 +1,15 @@
import warnings
warnings.warn(
"The 'supervision.keypoint' module is deprecated in `0.27.0` and will be removed "
"in `0.30.0`. Please use 'supervision.key_points' instead.",
DeprecationWarning,
stacklevel=2,
)
from supervision.key_points.annotators import ( # noqa: F401
BaseKeyPointAnnotator,
EdgeAnnotator,
VertexAnnotator,
VertexLabelAnnotator,
)

View File

@ -0,0 +1,10 @@
import warnings
warnings.warn(
"The 'supervision.keypoint' module is deprecated in `0.27.0` and will be removed "
"in `0.30.0`. Please use 'supervision.key_points' instead.",
DeprecationWarning,
stacklevel=2,
)
from supervision.key_points.core import KeyPoints # noqa: F401