Skip to content

Commit 37afad9

Browse files
committed
fix: Do not use deprecated getargspec
Fix getsentry#405
1 parent 69ce6bd commit 37afad9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sentry_sdk/consts.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ def _get_default_options():
5858
# type: () -> Dict[str, Any]
5959
import inspect
6060

61-
a = inspect.getargspec(ClientConstructor.__init__)
61+
if hasattr(inspect, "getfullargspec"):
62+
getargspec = inspect.getfullargspec # type: ignore
63+
else:
64+
getargspec = inspect.getargspec # type: ignore
65+
66+
a = getargspec(ClientConstructor.__init__)
6267
return dict(zip(a.args[-len(a.defaults) :], a.defaults))
6368

6469

0 commit comments

Comments
 (0)