diff --git a/requirements-testing.txt b/requirements-testing.txt index a6041972cd..f5df912552 100644 --- a/requirements-testing.txt +++ b/requirements-testing.txt @@ -7,7 +7,6 @@ pytest-localserver pytest-timeout pytest-watch jsonschema -executing asttokens responses pysocks diff --git a/scripts/populate_tox/config.py b/scripts/populate_tox/config.py index 317afa53ca..6753c02f4d 100644 --- a/scripts/populate_tox/config.py +++ b/scripts/populate_tox/config.py @@ -108,6 +108,7 @@ "djangorestframework", "pytest-django", "Werkzeug", + "executing", ], ">=2.0": ["channels[daphne]"], ">=2.2,<3.1": ["six"], @@ -331,6 +332,9 @@ }, "pure_eval": { "package": "pure_eval", + "deps": { + "*": ["executing"], + }, "num_versions": 2, }, "pydantic_ai": { diff --git a/scripts/populate_tox/tox.jinja b/scripts/populate_tox/tox.jinja index 40426d30fb..f11a903266 100644 --- a/scripts/populate_tox/tox.jinja +++ b/scripts/populate_tox/tox.jinja @@ -79,6 +79,7 @@ deps = # === Common === py3.8-common: hypothesis + common: executing common: pytest-asyncio common: httpcore[asyncio] # See https://github.com/pytest-dev/pytest/issues/9621 @@ -97,6 +98,7 @@ deps = # for justification of the upper bound on pytest {py3.6,py3.7}-gevent: pytest<7.0.0 {py3.8,py3.9,py3.10,py3.11,py3.12}-gevent: pytest + gevent: executing gevent: pytest-asyncio gevent: setuptools<82 {py3.10,py3.11}-gevent: zope.event<5.0.0 diff --git a/sentry_sdk/integrations/executing.py b/sentry_sdk/integrations/executing.py index cd31fcff96..4473fcc435 100644 --- a/sentry_sdk/integrations/executing.py +++ b/sentry_sdk/integrations/executing.py @@ -11,7 +11,7 @@ from sentry_sdk._types import Event, Hint try: - import executing + from executing import Source except ImportError: raise DidNotEnable("executing is not installed") @@ -60,7 +60,7 @@ def add_executing_info( for sentry_frame, tb in zip(sentry_frames, tbs): frame = tb.tb_frame - source = executing.Source.for_frame(frame) + source = Source.for_frame(frame) sentry_frame["function"] = source.code_qualname(frame.f_code) return event diff --git a/tox.ini b/tox.ini index e91115d32e..5c72f2399a 100644 --- a/tox.ini +++ b/tox.ini @@ -402,6 +402,7 @@ deps = # === Common === py3.8-common: hypothesis + common: executing common: pytest-asyncio common: httpcore[asyncio] # See https://github.com/pytest-dev/pytest/issues/9621 @@ -420,6 +421,7 @@ deps = # for justification of the upper bound on pytest {py3.6,py3.7}-gevent: pytest<7.0.0 {py3.8,py3.9,py3.10,py3.11,py3.12}-gevent: pytest + gevent: executing gevent: pytest-asyncio gevent: setuptools<82 {py3.10,py3.11}-gevent: zope.event<5.0.0 @@ -12198,6 +12200,7 @@ deps = django: djangorestframework django: pytest-django django: Werkzeug + django: executing django-v2.2.28: channels[daphne] django-v3.2.25: channels[daphne] django-v4.2.30: channels[daphne] @@ -13859,6 +13862,7 @@ deps = pure_eval-latest: pure_eval==0.2.3 + pure_eval: executing trytond-v4.6.22: trytond==4.6.22