Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 0 additions & 1 deletion requirements-testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
pytest>=6.0.0
tomli;python_version<"3.11" # Only needed for pytest on Python < 3.11
pytest-cov
pytest-forked
pytest-localserver

Check warning on line 5 in requirements-testing.txt

View check run for this annotation

@sentry/warden / warden: find-bugs

Removing pytest-forked from requirements-testing.txt leaves gevent and opentelemetry tox environments without it

After removing `pytest-forked` from `requirements-testing.txt`, the `gevent` and `opentelemetry` tox environments have no path to install it, yet both contain tests decorated with `@pytest.mark.forked` that require process isolation.
pytest-timeout
pytest-watch
jsonschema
Expand Down
13 changes: 10 additions & 3 deletions scripts/populate_tox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"celery": {
"package": "celery",
"deps": {
"*": ["newrelic<10.17.0", "redis"],
"*": ["newrelic<10.17.0", "redis", "pytest-forked"],
"py3.6": ["newrelic<8"],
"py3.7": ["importlib-metadata<5.0"],
},
Expand All @@ -107,6 +107,7 @@
"psycopg2-binary",
"djangorestframework",
"pytest-django",
"pytest-forked",
"Werkzeug",
],
">=2.0": ["channels[daphne]"],
Expand Down Expand Up @@ -182,10 +183,16 @@
"py3.6": ["aiocontextvars"],
},
},
"grpc": {

Check warning on line 186 in scripts/populate_tox/config.py

View check run for this annotation

@sentry/warden / warden: code-review

[U4Z-598] `opentelemetry`/`otlp`/`potel` tox envs lose `pytest-forked` after removal from requirements-testing.txt (additional location)

`pytest-forked` was removed from `requirements-testing.txt`, and `tox.jinja` only re-adds it for the `common` and `gevent` test environments (`common: pytest-forked`). The `opentelemetry`, `otlp`, and `potel` envs (defined at `tox.jinja` lines 124-131) only declare `opentelemetry-distro` and do not include `pytest-forked`. Those envs run `tests/integrations/opentelemetry/` (via `_TESTPATH`), where tests such as `test_propagator.py` and `test_experimental.py` use `@pytest.mark.forked` to isolate global-state mutation. Since there is no `--strict-markers` config (pyproject.toml `markers` only lists `tests_internal_exceptions`), the unknown `forked` marker is silently ignored and those tests run in-process, defeating the intended isolation and risking cross-test pollution/flakiness.
"package": "grpcio",
"deps": {
"*": ["protobuf", "mypy-protobuf", "types-protobuf", "pytest-asyncio"],
"*": [
"protobuf",
"mypy-protobuf",
"types-protobuf",
"pytest-asyncio",
"pytest-forked",
],
},
"python": ">=3.7",
},
Expand Down Expand Up @@ -368,7 +375,7 @@
"quart": {
"package": "quart",
"deps": {
"*": ["quart-auth", "pytest-asyncio", "Werkzeug"],
"*": ["quart-auth", "pytest-asyncio", "pytest-forked", "Werkzeug"],

Check warning on line 378 in scripts/populate_tox/config.py

View check run for this annotation

@sentry/warden / warden: code-review

`opentelemetry`/`otlp`/`potel` tox envs lose `pytest-forked` after removal from requirements-testing.txt

`pytest-forked` was removed from `requirements-testing.txt`, and `tox.jinja` only re-adds it for the `common` and `gevent` test environments (`common: pytest-forked`). The `opentelemetry`, `otlp`, and `potel` envs (defined at `tox.jinja` lines 124-131) only declare `opentelemetry-distro` and do not include `pytest-forked`. Those envs run `tests/integrations/opentelemetry/` (via `_TESTPATH`), where tests such as `test_propagator.py` and `test_experimental.py` use `@pytest.mark.forked` to isolate global-state mutation. Since there is no `--strict-markers` config (pyproject.toml `markers` only lists `tests_internal_exceptions`), the unknown `forked` marker is silently ignored and those tests run in-process, defeating the intended isolation and risking cross-test pollution/flakiness.

Check warning on line 378 in scripts/populate_tox/config.py

View check run for this annotation

@sentry/warden / warden: find-bugs

[NDD-H4C] Removing pytest-forked from requirements-testing.txt leaves gevent and opentelemetry tox environments without it (additional location)

After removing `pytest-forked` from `requirements-testing.txt`, the `gevent` and `opentelemetry` tox environments have no path to install it, yet both contain tests decorated with `@pytest.mark.forked` that require process isolation.
Comment thread
alexander-alderman-webb marked this conversation as resolved.
">=0.19": ["quart-flask-patch"],
"<0.19": [
"blinker<1.6",
Expand Down
1 change: 1 addition & 0 deletions scripts/populate_tox/tox.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ deps =
# === Common ===
py3.8-common: hypothesis
common: pytest-asyncio
common: pytest-forked
common: httpcore[asyncio]
# See https://github.com/pytest-dev/pytest/issues/9621
# and https://github.com/pytest-dev/pytest-forked/issues/67
Comment thread
sentry[bot] marked this conversation as resolved.
Expand Down
Loading