Support Python 3.10 runtime compatibility (#5366)
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
This commit is contained in:
1 parent
18be2ba3df
commit
7be7e0d249
6 files changed
+38
-71
No files matched your search
@@ -16,20 +16,10 @@ Key invariants tested:
|
||||
- voice/speaker parameter compatibility in chat completions
|
||||
"""
|
||||
|
||||
import enum
|
||||
import json
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
import pytest
|
||||
|
||||
# Python 3.10 compat: StrEnum was added in 3.11
|
||||
if not hasattr(enum, "StrEnum"):
|
||||
|
||||
class _StrEnum(str, enum.Enum):
|
||||
"""Minimal StrEnum backport for Python 3.10."""
|
||||
|
||||
enum.StrEnum = _StrEnum # type: ignore[attr-defined]
|
||||
|
||||
from vllm.entrypoints.openai.chat_completion.protocol import (
|
||||
ChatCompletionRequest,
|
||||
ChatCompletionResponseStreamChoice,
|
||||
|
||||
Reference in new issue
Block a user