Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions cognitive/src/main/python/synapse/ml/cognitive/bing.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
import warnings
from synapse.ml.services.bing import *

# Raise a deprecation warning for the entire submodule
# Keep module importable for legacy callers, but signal removal at runtime.
warnings.warn(
"Importing from 'synapse.ml.cognitive.bing' is deprecated. Use 'synapse.ml.services.bing' instead.",
"The Bing cognitive services have been removed from SynapseML; the "
"'synapse.ml.cognitive.bing' compatibility module will be deleted in a future release.",
DeprecationWarning,
stacklevel=2,
)

__all__ = []


def __getattr__(name: str):
"""Inform callers that the legacy Bing APIs are no longer available."""

raise ImportError(
"Attribute '{0}' is unavailable because the Bing services were removed from SynapseML.".format(name)
)

This file was deleted.

Empty file.

This file was deleted.

Loading
Loading