Skip to content

Commit 680b93c

Browse files
author
Andrei Neagu
committed
added deprecation warning
1 parent 59c5215 commit 680b93c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/service-library/src/servicelib/fastapi/long_running_tasks/_context_manager.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import asyncio
22
import logging
3+
import warnings
34
from collections.abc import AsyncIterator
45
from contextlib import asynccontextmanager
56
from typing import Any, Final
@@ -95,6 +96,13 @@ async def periodic_task_result(
9596
raises: `asyncio.TimeoutError` NOTE: the remote task will also be removed
9697
"""
9798

99+
warnings.warn(
100+
"This context manager is deprecated and will be removed in future releases. "
101+
"Please use the `servicelib.long_running_tasks.lrt_api` instead.",
102+
DeprecationWarning,
103+
stacklevel=2,
104+
)
105+
98106
progress_manager = _ProgressManager(progress_callback)
99107

100108
async def _status_update() -> TaskStatus:

0 commit comments

Comments
 (0)