[Misc] Add backward-compatible import aliases for renamed translations module (#34015)
Signed-off-by: Kourosh Hakhamaneshi <kourosh@anyscale.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
GitHub
parent
3920cafdd6
commit
1c3b22058f
12
vllm/entrypoints/openai/translations/__init__.py
Normal file
12
vllm/entrypoints/openai/translations/__init__.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
import warnings
|
||||
|
||||
warnings.warn(
|
||||
"The 'vllm.entrypoints.openai.translations' module has been renamed to "
|
||||
"'vllm.entrypoints.openai.speech_to_text'. Please update your imports. "
|
||||
"This backward-compatible alias will be removed in version 0.17+.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
14
vllm/entrypoints/openai/translations/api_router.py
Normal file
14
vllm/entrypoints/openai/translations/api_router.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
import warnings
|
||||
|
||||
warnings.warn(
|
||||
"'vllm.entrypoints.openai.translations.api_router' has been moved to "
|
||||
"'vllm.entrypoints.openai.speech_to_text.api_router'. Please update your "
|
||||
"imports. This backward-compatible alias will be removed in version 0.17+.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
||||
from vllm.entrypoints.openai.speech_to_text.api_router import * # noqa: F401,F403,E402
|
||||
14
vllm/entrypoints/openai/translations/protocol.py
Normal file
14
vllm/entrypoints/openai/translations/protocol.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
import warnings
|
||||
|
||||
warnings.warn(
|
||||
"'vllm.entrypoints.openai.translations.protocol' has been moved to "
|
||||
"'vllm.entrypoints.openai.speech_to_text.protocol'. Please update your "
|
||||
"imports. This backward-compatible alias will be removed in version 0.17+.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
||||
from vllm.entrypoints.openai.speech_to_text.protocol import * # noqa: F401,F403,E402
|
||||
14
vllm/entrypoints/openai/translations/serving.py
Normal file
14
vllm/entrypoints/openai/translations/serving.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
import warnings
|
||||
|
||||
warnings.warn(
|
||||
"'vllm.entrypoints.openai.translations.serving' has been moved to "
|
||||
"'vllm.entrypoints.openai.speech_to_text.serving'. Please update your "
|
||||
"imports. This backward-compatible alias will be removed in version 0.17+.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
||||
from vllm.entrypoints.openai.speech_to_text.serving import * # noqa: F401,F403,E402
|
||||
15
vllm/entrypoints/openai/translations/speech_to_text.py
Normal file
15
vllm/entrypoints/openai/translations/speech_to_text.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
import warnings
|
||||
|
||||
warnings.warn(
|
||||
"'vllm.entrypoints.openai.translations.speech_to_text' has been moved to "
|
||||
"'vllm.entrypoints.openai.speech_to_text.speech_to_text'. Please update "
|
||||
"your imports. This backward-compatible alias will be removed in version "
|
||||
"0.17+.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
||||
from vllm.entrypoints.openai.speech_to_text.speech_to_text import * # noqa: F401,F403,E402
|
||||
Reference in New Issue
Block a user