Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion sentry_sdk/integrations/beam.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,15 @@ def _inspect(self):
process_func = getattr(self, func_name)
setattr(self, func_name, _wrap_task_call(process_func))
setattr(self, wrapped_func, process_func)
return getfullargspec(process_func)

# getfullargspec is deprecated in more recent beam versions and get_function_args_defaults
# (which uses Signatures internally) should be used instead.
try:
from apache_beam.transforms.core import get_function_args_defaults

return get_function_args_defaults(process_func)
except ImportError:
return getfullargspec(process_func)

setattr(_inspect, USED_FUNC, True)
return _inspect
Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ envlist =
{pypy,py2.7,py3.5,py3.6,py3.7,py3.8}-celery-{4.1,4.2,4.3}
{pypy,py2.7}-celery-3

{py2.7,py3.6}-beam-{12,13}
py3.7-beam-{12,13}
py2.7-beam-{12,13}
py3.7-beam-{12,13, master}

# The aws_lambda tests deploy to the real AWS and have their own matrix of Python versions.
py3.7-aws_lambda
Expand Down Expand Up @@ -98,6 +98,7 @@ deps =

beam-12: apache-beam>=2.12.0, <2.13.0
beam-13: apache-beam>=2.13.0, <2.14.0
beam-master: git+https://github.com/apache/beam#egg=apache-beam&subdirectory=sdks/python

celery-3: Celery>=3.1,<4.0
celery-4.1: Celery>=4.1,<4.2
Expand Down