FrameProcessor: remove deprecated wait_for_task()

This commit is contained in:
Aleix Conchillo Flaqué
2026-03-30 14:45:42 -07:00
parent c8dd7c2b57
commit 7913d4e188

View File

@@ -527,33 +527,6 @@ class FrameProcessor(BaseObject):
"""
await self.task_manager.cancel_task(task, timeout)
async def wait_for_task(self, task: asyncio.Task, timeout: Optional[float] = None):
"""Wait for a task to complete.
.. deprecated:: 0.0.81
This function is deprecated, use `await task` or
`await asyncio.wait_for(task, timeout)` instead.
Args:
task: The task to wait for.
timeout: Optional timeout for waiting.
"""
import warnings
with warnings.catch_warnings():
warnings.simplefilter("always")
warnings.warn(
"`FrameProcessor.wait_for_task()` is deprecated. "
"Use `await task` or `await asyncio.wait_for(task, timeout)` instead.",
DeprecationWarning,
stacklevel=2,
)
if timeout:
await asyncio.wait_for(task, timeout)
else:
await task
async def setup(self, setup: FrameProcessorSetup):
"""Set up the processor with required components.