File: 0002-Inline-import-of-AuthType-Enum-to-avoid-dependency-o.patch

package info (click to toggle)
python-redis 6.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,432 kB
  • sloc: python: 60,318; sh: 179; makefile: 128
file content (44 lines) | stat: -rw-r--r-- 1,683 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From: Chris Lamb <lamby@debian.org>
Date: Wed, 14 May 2025 10:34:02 -0700
Subject: Inline import of AuthType Enum to avoid dependency on (unpackaged)
 EntraId provider module

---
 tests/test_asyncio/test_credentials.py | 6 +++++-
 tests/test_credentials.py              | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/test_asyncio/test_credentials.py b/tests/test_asyncio/test_credentials.py
index b4824be..a6d55d7 100644
--- a/tests/test_asyncio/test_credentials.py
+++ b/tests/test_asyncio/test_credentials.py
@@ -18,7 +18,11 @@ from redis.credentials import CredentialProvider, UsernamePasswordCredentialProv
 from redis.exceptions import ConnectionError
 from redis.utils import str_if_bytes
 from tests.conftest import get_endpoint, skip_if_redis_enterprise
-from tests.entraid_utils import AuthType
+from enum import Enum
+class AuthType(Enum):
+    MANAGED_IDENTITY = "managed_identity"
+    SERVICE_PRINCIPAL = "service_principal"
+    DEFAULT_AZURE_CREDENTIAL = "default_azure_credential"
 from tests.test_asyncio.conftest import get_credential_provider
 
 try:
diff --git a/tests/test_credentials.py b/tests/test_credentials.py
index 8b8e0cf..338128d 100644
--- a/tests/test_credentials.py
+++ b/tests/test_credentials.py
@@ -22,7 +22,11 @@ from tests.conftest import (
     get_endpoint,
     skip_if_redis_enterprise,
 )
-from tests.entraid_utils import AuthType
+from enum import Enum
+class AuthType(Enum):
+    MANAGED_IDENTITY = "managed_identity"
+    SERVICE_PRINCIPAL = "service_principal"
+    DEFAULT_AZURE_CREDENTIAL = "default_azure_credential"
 
 try:
     from redis_entraid.cred_provider import EntraIdCredentialsProvider