use warnings package to report deprecated code
This commit is contained in:
@@ -108,7 +108,9 @@ class DailyTranscriptionSettings(BaseModel):
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("always")
|
||||
if "tier" in values:
|
||||
warnings.warn("'tier' is deprecated, use 'model' instead", DeprecationWarning)
|
||||
warnings.warn(
|
||||
"Field 'tier' is deprecated, use 'model' instead.", DeprecationWarning
|
||||
)
|
||||
return values
|
||||
|
||||
|
||||
|
||||
@@ -4,9 +4,13 @@
|
||||
# SPDX-License-Identifier: BSD 2-Clause License
|
||||
#
|
||||
|
||||
from loguru import logger
|
||||
import warnings
|
||||
|
||||
logger.warning("DEPRECATED: Package `pipecat.vad` is deprecated, use `pipecat.audio.vad` instead.")
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("always")
|
||||
warnings.warn(
|
||||
"Package `pipecat.vad` is deprecated, use `pipecat.audio.vad` instead", DeprecationWarning
|
||||
)
|
||||
|
||||
from ..audio.vad.silero import SileroVADAnalyzer
|
||||
from ..processors.audio.vad.silero import SileroVAD
|
||||
|
||||
@@ -4,8 +4,12 @@
|
||||
# SPDX-License-Identifier: BSD 2-Clause License
|
||||
#
|
||||
|
||||
from loguru import logger
|
||||
import warnings
|
||||
|
||||
logger.warning("DEPRECATED: Package `pipecat.vad` is deprecated, use `pipecat.audio.vad` instead.")
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("always")
|
||||
warnings.warn(
|
||||
"Package `pipecat.vad` is deprecated, use `pipecat.audio.vad` instead", DeprecationWarning
|
||||
)
|
||||
|
||||
from ..audio.vad.vad_analyzer import VADAnalyzer, VADParams, VADState
|
||||
|
||||
Reference in New Issue
Block a user