File tree Expand file tree Collapse file tree 6 files changed +2
-58
lines changed
test_elasticsearch/test_client Expand file tree Collapse file tree 6 files changed +2
-58
lines changed Original file line number Diff line number Diff line change @@ -2496,11 +2496,6 @@ async def info(
24962496 ),
24972497 parameter_aliases = {"_source" : "source" },
24982498 )
2499- @_stability_warning (
2500- Stability .DEPRECATED ,
2501- version = "8.4.0" ,
2502- message = "The kNN search API has been replaced by the `knn` option in the search API." ,
2503- )
25042499 async def knn_search (
25052500 self ,
25062501 * ,
Original file line number Diff line number Diff line change 2020from elastic_transport import ObjectApiResponse
2121
2222from ._base import NamespacedClient
23- from .utils import (
24- SKIP_IN_PATH ,
25- Stability ,
26- _quote ,
27- _rewrite_parameters ,
28- _stability_warning ,
29- )
23+ from .utils import SKIP_IN_PATH , _quote , _rewrite_parameters
3024
3125
3226class MlClient (NamespacedClient ):
@@ -2849,11 +2843,6 @@ async def post_calendar_events(
28492843 @_rewrite_parameters (
28502844 body_name = "data" ,
28512845 )
2852- @_stability_warning (
2853- Stability .DEPRECATED ,
2854- version = "7.11.0" ,
2855- message = "Posting data directly to anomaly detection jobs is deprecated, in a future major version a datafeed will be required." ,
2856- )
28572846 async def post_data (
28582847 self ,
28592848 * ,
Original file line number Diff line number Diff line change @@ -2494,11 +2494,6 @@ def info(
24942494 ),
24952495 parameter_aliases = {"_source" : "source" },
24962496 )
2497- @_stability_warning (
2498- Stability .DEPRECATED ,
2499- version = "8.4.0" ,
2500- message = "The kNN search API has been replaced by the `knn` option in the search API." ,
2501- )
25022497 def knn_search (
25032498 self ,
25042499 * ,
Original file line number Diff line number Diff line change 2020from elastic_transport import ObjectApiResponse
2121
2222from ._base import NamespacedClient
23- from .utils import (
24- SKIP_IN_PATH ,
25- Stability ,
26- _quote ,
27- _rewrite_parameters ,
28- _stability_warning ,
29- )
23+ from .utils import SKIP_IN_PATH , _quote , _rewrite_parameters
3024
3125
3226class MlClient (NamespacedClient ):
@@ -2849,11 +2843,6 @@ def post_calendar_events(
28492843 @_rewrite_parameters (
28502844 body_name = "data" ,
28512845 )
2852- @_stability_warning (
2853- Stability .DEPRECATED ,
2854- version = "7.11.0" ,
2855- message = "Posting data directly to anomaly detection jobs is deprecated, in a future major version a datafeed will be required." ,
2856- )
28572846 def post_data (
28582847 self ,
28592848 * ,
Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ class Stability(Enum):
7878 STABLE = auto ()
7979 BETA = auto ()
8080 EXPERIMENTAL = auto ()
81- DEPRECATED = auto ()
8281
8382
8483_TYPE_HOSTS = Union [
@@ -484,12 +483,6 @@ def wrapped(*args: Any, **kwargs: Any) -> Any:
484483 category = GeneralAvailabilityWarning ,
485484 stacklevel = warn_stacklevel (),
486485 )
487- elif stability == Stability .DEPRECATED :
488- warnings .warn (
489- f"This API was deprecated in Elasticsearch { version } . { message } " ,
490- category = DeprecationWarning ,
491- stacklevel = warn_stacklevel (),
492- )
493486
494487 return api (* args , ** kwargs )
495488
Original file line number Diff line number Diff line change @@ -81,20 +81,3 @@ def func_experimental(*args, **kwargs):
8181 assert user_warning .message .args [0 ].startswith (
8282 "This API is in technical preview and may be changed or removed in a future release."
8383 )
84-
85- def test_deprecated (self , recwarn ):
86-
87- @_stability_warning (
88- stability = Stability .DEPRECATED , version = "8.4.0" , message = "Use bar instead."
89- )
90- def func_deprecated (* args , ** kwargs ):
91- pass
92-
93- func_deprecated ()
94-
95- assert len (recwarn ) == 1
96- user_warning = recwarn .pop (DeprecationWarning )
97- assert user_warning .category == DeprecationWarning
98- assert user_warning .message .args [0 ] == (
99- "This API was deprecated in Elasticsearch 8.4.0. Use bar instead."
100- )
You can’t perform that action at this time.
0 commit comments