Skip to content

Commit 8a9684b

Browse files
ci: Remove executing from requirements-testing.txt (#6619)
Remove the package from `requirements-testing.txt` and add it only as a dependency of the test suites that rely on it. Change `executing` import used for `ExecutingIntegration` to be more specific so `test_shadowed_modules_when_importing_integrations` passes. This is part of environment cleanup before moving the remaining testing dependencies to a uv dependency group.
1 parent 9c02b35 commit 8a9684b

5 files changed

Lines changed: 10 additions & 4 deletions

File tree

requirements-testing.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
pytest>=6.0.0
22
pytest-cov
33
dataclasses; python_version < "3.7"
4-
executing
54
setuptools

scripts/populate_tox/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
"pytest-forked",
111111
"Werkzeug",
112112
"channels[daphne]",
113+
"executing",
113114
],
114115
">=3.0": ["pytest-asyncio"],
115116
"<3.3": [
@@ -343,7 +344,7 @@
343344
"pure_eval": {
344345
"package": "pure_eval",
345346
"deps": {
346-
"*": ["asttokens"],
347+
"*": ["asttokens", "executing"],
347348
},
348349
"num_versions": 2,
349350
},

scripts/populate_tox/tox.jinja

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ deps =
8080
# === Common ===
8181
py3.8-common: hypothesis
8282
common: brotli
83+
common: executing
8384
common: httpcore[asyncio,http2]
8485
common: jsonschema
8586
common: pysocks
@@ -106,6 +107,7 @@ deps =
106107
{py3.6,py3.7}-gevent: pytest<7.0.0
107108
{py3.8,py3.9,py3.10,py3.11,py3.12}-gevent: pytest
108109
gevent: brotli
110+
gevent: executing
109111
gevent: httpcore[http2]
110112
gevent: jsonschema
111113
gevent: pysocks

sentry_sdk/integrations/executing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from sentry_sdk._types import Event, Hint
1212

1313
try:
14-
import executing
14+
from executing import Source
1515
except ImportError:
1616
raise DidNotEnable("executing is not installed")
1717

@@ -60,7 +60,7 @@ def add_executing_info(
6060

6161
for sentry_frame, tb in zip(sentry_frames, tbs):
6262
frame = tb.tb_frame
63-
source = executing.Source.for_frame(frame)
63+
source = Source.for_frame(frame)
6464
sentry_frame["function"] = source.code_qualname(frame.f_code)
6565

6666
return event

tox.ini

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)