Skip to content

Commit

Permalink
ref(consts): Remove Python 2 compatibility code (#3284)
Browse files Browse the repository at this point in the history
All the versions we now support include `inspect.getfullargspec`, so we no longer need the backwards-compatible fallback.
  • Loading branch information
szokeasaurusrex authored Jul 12, 2024
1 parent 8a95971 commit ae034ab
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions sentry_sdk/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,12 +546,7 @@ def _get_default_options():
# type: () -> dict[str, Any]
import inspect

if hasattr(inspect, "getfullargspec"):
getargspec = inspect.getfullargspec
else:
getargspec = inspect.getargspec # type: ignore

a = getargspec(ClientConstructor.__init__)
a = inspect.getfullargspec(ClientConstructor.__init__)
defaults = a.defaults or ()
kwonlydefaults = a.kwonlydefaults or {}

Expand Down

0 comments on commit ae034ab

Please sign in to comment.