diff --git a/test_opensearchpy/test_async/test_plugins_client.py b/test_opensearchpy/test_async/test_plugins_client.py index 3e0141115..1ee4d17ba 100644 --- a/test_opensearchpy/test_async/test_plugins_client.py +++ b/test_opensearchpy/test_async/test_plugins_client.py @@ -8,6 +8,7 @@ # GitHub history for details. +import re import warnings import pytest @@ -24,8 +25,7 @@ async def test_plugins_client(self) -> None: client = AsyncOpenSearch() # testing double-init here client.plugins.__init__(client) # type: ignore # pylint: disable=unnecessary-dunder-call - assert ( - str(w[0].message) - == "Cannot load `alerting` directly to AsyncOpenSearch as it already exists. Use " - "`AsyncOpenSearch.plugin.alerting` instead." + assert re.match( + r"Cannot load `\w+` directly to AsyncOpenSearch as it already exists. Use `AsyncOpenSearch.plugin.\w+` instead.", + str(w[0].message), ) diff --git a/test_opensearchpy/test_client/test_plugins/test_plugins_client.py b/test_opensearchpy/test_client/test_plugins/test_plugins_client.py index 658defa69..0a74a9e18 100644 --- a/test_opensearchpy/test_client/test_plugins/test_plugins_client.py +++ b/test_opensearchpy/test_client/test_plugins/test_plugins_client.py @@ -7,6 +7,8 @@ # Modifications Copyright OpenSearch Contributors. See # GitHub history for details. +import re + from opensearchpy.client import OpenSearch from ...test_cases import TestCase @@ -18,8 +20,9 @@ def test_plugins_client(self) -> None: client = OpenSearch() # double-init client.plugins.__init__(client) # type: ignore # pylint: disable=unnecessary-dunder-call - self.assertEqual( - str(w.warnings[0].message), - "Cannot load `alerting` directly to OpenSearch as " - "it already exists. Use `OpenSearch.plugin.alerting` instead.", + self.assertTrue( + re.match( + r"Cannot load `\w+` directly to OpenSearch as it already exists. Use `OpenSearch.plugin.\w+` instead.", + str(w.warnings[0].message), + ) ) diff --git a/utils/generate_api.py b/utils/generate_api.py index c85ed8d27..8b02e1be6 100644 --- a/utils/generate_api.py +++ b/utils/generate_api.py @@ -704,6 +704,10 @@ def read_modules() -> Any: namespace = "__init__" name = key + # FIXME: we have a hard-coded index_management that needs to be deprecated in favor of the auto-generated one + if namespace == "ism": + continue + # Group the data in the current group by the "path" key paths = [] all_paths_have_deprecation = True