Skip to content

chore(aioredis): mark deprecation #14356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions ddtrace/contrib/internal/aioredis/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@
from ddtrace.internal.constants import COMPONENT
from ddtrace.internal.schema import schematize_cache_operation
from ddtrace.internal.schema import schematize_service_name
from ddtrace.internal.utils.deprecations import DDTraceDeprecationWarning
from ddtrace.internal.utils.formats import CMD_MAX_LEN
from ddtrace.internal.utils.formats import asbool
from ddtrace.internal.utils.formats import stringify_cache_args
from ddtrace.internal.utils.wrappers import unwrap as _u
from ddtrace.trace import Pin
from ddtrace.vendor.debtcollector import deprecate
from ddtrace.vendor.packaging.version import parse as parse_version


Expand All @@ -50,8 +52,7 @@
V2 = parse_version("2.0")


def get_version():
# type: () -> str
def get_version() -> str:
return aioredis_version_str


Expand All @@ -60,6 +61,12 @@ def _supported_versions() -> Dict[str, str]:


def patch():
deprecate(
"The aioredis integration is deprecated.",
message="Use the redis integration instead.",
category=DDTraceDeprecationWarning,
removal_version="4.0.0",
)
if getattr(aioredis, "_datadog_patch", False):
return
aioredis._datadog_patch = True
Expand Down
Loading