Skip to content

Commit 35d9b98

Browse files
chore: remove StrEnum
1 parent 653dd7d commit 35d9b98

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

google/cloud/sql/connector/enums.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@
1414

1515
from __future__ import annotations
1616

17-
from enum import StrEnum
17+
from enum import Enum
1818

1919
from google.cloud.sql.connector.exceptions import IncompatibleDriverError
2020

2121

22-
class RefreshStrategy(StrEnum):
22+
# TODO: Replace Enum with StrEnum when Python 3.11 is minimum supported version
23+
class RefreshStrategy(Enum):
2324
LAZY = "LAZY"
2425
BACKGROUND = "BACKGROUND"
2526

@@ -36,7 +37,7 @@ def _from_str(cls, refresh_strategy: str) -> RefreshStrategy:
3637
return cls(refresh_strategy.upper())
3738

3839

39-
class IPTypes(StrEnum):
40+
class IPTypes(Enum):
4041
PUBLIC = "PRIMARY"
4142
PRIVATE = "PRIVATE"
4243
PSC = "PSC"
@@ -56,7 +57,7 @@ def _from_str(cls, ip_type_str: str) -> IPTypes:
5657
return cls(ip_type_str.upper())
5758

5859

59-
class DriverMapping(StrEnum):
60+
class DriverMapping(Enum):
6061
"""Maps a given database driver to it's corresponding database engine."""
6162

6263
ASYNCPG = "POSTGRES"

0 commit comments

Comments
 (0)