make sure warnings are always displayed

This commit is contained in:
Aleix Conchillo Flaqué
2025-08-28 15:30:23 -07:00
parent a5c5e069ba
commit 79be0695dd
13 changed files with 130 additions and 91 deletions

View File

@@ -14,7 +14,6 @@ import io
import json
import struct
import uuid
import warnings
from typing import AsyncGenerator, Optional
import aiohttp
@@ -455,11 +454,15 @@ class PlayHTHttpTTSService(TTSService):
# Warn about deprecated protocol parameter if explicitly provided
if protocol:
warnings.warn(
"The 'protocol' parameter is deprecated and will be removed in a future version.",
DeprecationWarning,
stacklevel=2,
)
import warnings
with warnings.catch_warnings():
warnings.simplefilter("always")
warnings.warn(
"The 'protocol' parameter is deprecated and will be removed in a future version.",
DeprecationWarning,
stacklevel=2,
)
params = params or PlayHTHttpTTSService.InputParams()