You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you need to read the source of an instrumented third-party library — to verify an API signature, understand class internals, or trace how a wrapped method behaves — **always look in `.tox/` first**. Do not grep system Python paths, and do not run `pip install` into the project.
Use a `python*` glob — the Python minor version (e.g., `python3.12`, `python3.14`) varies by env and is encoded in the env name itself (`-py312-`, `-py314-`).
97
+
98
+
### Lookup Procedure
99
+
100
+
1.**List existing envs**: `tox -l | grep <library>` (or `ls .tox/`). Built envs contain the library; the others are just names in `tox.ini`.
101
+
2.**Pick a version**: Prefer the env suffixed with `latest` (e.g., `flasklatest`, `djangolatest`) for the newest upstream code. If multiple `*latest` envs exist at different Python versions, prefer the newest Python (e.g., `-py314-` over `-py312-`). If you need an older or specific library version (e.g., `flask0203`), pick the matching versioned env instead.
102
+
3.**Build the env if it doesn't exist yet**: If the env appears in `tox.ini` but not in `.tox/`, generate it without running tests:
103
+
```bash
104
+
tox r -e <env_name> --notest
105
+
```
106
+
Use this same command to install any specific version you need — just pick the right env name.
107
+
4.**If no env name covers the library at all**: Run `grep -i <library> tox.ini` to confirm. If genuinely absent from the test matrix, ask the user before adding a new env.
108
+
109
+
### Reading the newrelic Package
110
+
111
+
The Python Agent (`newrelic` package) is installed into every env's `site-packages` with either the full source or as an editable install (you'll see `__editable__.newrelic-*.pth` files). Do not read agent code from `.tox/` — always read it from the project source tree to avoid stale or cached versions.
0 commit comments