Skip to content

Commit c318b90

Browse files
Handle "rc" in SQLAlchemy version. (#1812)
Co-authored-by: Neel Shah <[email protected]>
1 parent 55b2902 commit c318b90

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sentry_sdk/integrations/sqlalchemy.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from __future__ import absolute_import
22

3+
import re
4+
35
from sentry_sdk._types import MYPY
46
from sentry_sdk.hub import Hub
57
from sentry_sdk.integrations import Integration, DidNotEnable
@@ -28,7 +30,9 @@ def setup_once():
2830
# type: () -> None
2931

3032
try:
31-
version = tuple(map(int, SQLALCHEMY_VERSION.split("b")[0].split(".")))
33+
version = tuple(
34+
map(int, re.split("b|rc", SQLALCHEMY_VERSION)[0].split("."))
35+
)
3236
except (TypeError, ValueError):
3337
raise DidNotEnable(
3438
"Unparsable SQLAlchemy version: {}".format(SQLALCHEMY_VERSION)

0 commit comments

Comments
 (0)