Repository navigation
Conversation
nina-msft
commented
Jun 22, 2026
| print_deprecation_message( | ||
| old_item="The rampart_sinks fixture", | ||
| new_item="the pytest_rampart_sinks hook", | ||
| removed_in="1.0.0", |
nina-msft
commented
Jun 22, 2026
| print_deprecation_message( | ||
| old_item="The rampart_sinks fixture", | ||
| new_item="the pytest_rampart_sinks hook", | ||
| removed_in="1.0.0", |
nina-msft
commented
Jun 22, 2026
| ### `rampart_sinks` | ||
|
|
||
| !!! warning "Deprecated" | ||
| The `rampart_sinks` fixture is deprecated and will be removed in `1.0.0`. |
nina-msft
commented
Jun 22, 2026
| ### Precedence vs the `rampart_sinks` fixture | ||
|
|
||
| !!! warning "Deprecated" | ||
| The `rampart_sinks` fixture is deprecated and will be removed in `1.0.0`. |
…oft#73) ## Description ### Summary Adds first-class `pytest-xdist` support to RAMPART so attack/probe sessions can shard across worker processes and still produce a single coherent report. Worker processes serialize their results through xdist's `workeroutput` channel; the controller deserializes, merges, and writes the final report. ### What's included **New: `_xdist.py`** - Versioned schema (`rampart.xdist.v1`) for worker → controller payloads - `_sanitize` JSON-safe coercion at the trust boundary with depth limit, byte-size cap, and ANSI-escape stripping on deserialize to defend against terminal injection from worker output - `SizeLimitError` raised by `finalize_worker` when the serialized payload exceeds the configured cap; controller logs and continues - Configurable cap via new pytest CLI option `--rampart-xdist-max-bytes` / ini option `rampart_xdist_max_bytes` (default 64 MiB), validated positive - Sink resolution re-raises `KeyboardInterrupt`/`SystemExit`, catches `Exception` **Trial-group aggregation across workers** - Trial metadata is captured as data on `RampartSession` at collection time and shipped through the `rampart.xdist.v1` payload (`trial_specs`), so the controller aggregates trial groups from merged worker data instead of `session.items` — which is not reliably populated with trial clones on the controller at session finish. Without this, trial-group FAIL/PASS verdicts silently disappeared under xdist even though per-clone results were present. - `trial_specs` is back-compatible: payloads without trials emit an empty list; malformed entries are skipped and non-finite thresholds are clamped on deserialize. **Deterministic result ordering & sink resolution (review feedback)** - Merged results sort by a stable key `(_pytest_nodeid, _rampart_result_index, _rampart_source_worker)` so aggregated reports are reproducible regardless of worker completion order. These bookkeeping keys are namespaced with leading underscores so they cannot collide with user-supplied result metadata. `_pytest_nodeid`/`_rampart_result_index` are assigned authoritatively (absorb-time enumerate; deserialize-time outer-key + enumerate); `_rampart_source_worker` is tagged on `handle_testnodedown`. The full node ID (not the trailing `test_name`) is the primary sort key, so same-named tests in different files, parametrized cases, and trial clones no longer collide. - New `pytest_rampart_sinks` hook (`_hooks.py`) is the authoritative sink source — keyed on hook-impl existence, not truthiness — and short-circuits the fixture path so projects defining both don't double-register. The `rampart_sinks` fixture remains the single-process fallback. - Controller-side discovery **unwraps a `@pytest.fixture`-wrapped parameterless `rampart_sinks`** to its underlying function (`_get_wrapped_function()` with `_fixture_function`/`__wrapped__` fallbacks, wrapped in try/except) and calls it directly, restoring the documented session-fixture fallback under `-n`. Fixtures that depend on other fixtures now warn and point at the hook instead of silently disappearing. - `is_xdist_controller` keys off the active distribution (`dist != "no"` plus `-n`/`--tx` endpoints), not the worker count alone, so `-d`/`--tx` runs without `-n` and custom schedulers resolve to the controller branch instead of the empty single-process path. - Shared `strip_ansi` extracted to `rampart/common/text.py` (CSI/OSC/DCS/SOS/PM/APC/NF + 7-bit and 8-bit C1, then residual C0/C1 stripping, preserving tab/newline/CR) and reused by both the terminal summary and the xdist boundary. **Incomplete runs fail loudly (review feedback)** - A lost or crashed xdist worker can leave every surviving test green. For a safety framework "green" must mean "ran and passed", so `pytest_sessionfinish` forces a non-zero exit status (`OK → TESTS_FAILED`) whenever the merged session is incomplete. An already-failing status is left untouched so a stronger failure signal (e.g. `INTERRUPTED`) is never masked. Workers early-return before enforcement, so a worker's local incompleteness never decides the controller's exit code. - Incomplete-run reasons are also surfaced as a prominent terminal warning (before the `has_results` guard) when workers crash or report partial data. **Updated plugin hooks (`plugin.py`, `_session.py`)** - `pytest_addoption` registers the new CLI/ini option; `pytest_addhooks` registers `pytest_rampart_sinks` - Worker, controller, and non-xdist branches dispatched cleanly; shared aggregation/gating is hoisted above the branch and only xdist metadata + sink discovery are guarded by `is_xdist_controller`; the worker branch wraps `finalize_worker` to surface size-limit truncation as a warning **Reporting** - `JsonFileReportSink` now projects `report.metadata`, so xdist run-mode info (worker_count, dist_mode, incomplete reasons) lands in the emitted JSON file. The xdist transport serializer and the JSON-report serializer are deliberately kept separate (full-fidelity round-trip vs. flatter public shape), with doc-comments on both explaining why they must not be merged. **Tests** - 82 unit tests in `test_xdist.py` (serialization, sanitization, size limits, ANSI stripping, controller detection, sink resolution/unwrap, option parsing, ordering determinism incl. reverse-order merge, trial-spec round-trip/merge) - 13 unit tests in `test_text.py` for shared `strip_ansi` (CSI, OSC BEL/ST, DCS, 8-bit CSI, lone C1, residual C0, whitespace preservation, no over-stripping) - `test_plugin.py` extended (60 tests) for sink-hook resolution, OSC sanitizing, the incomplete-warning path, and incomplete-run exit-status enforcement (`TestIncompleteExitStatus`) - `test_json_file.py` extended (14 tests) for metadata projection - Slow-marked unit `test_xdist_aggregation.py` (13 tests) exercising end-to-end aggregation across real worker subprocesses, including trial-group verdicts under both `--dist=loadgroup` and `--dist=load` (run with `-m slow`) **Docs** - New `xdist.md` user guide, incl. the `pytest_rampart_sinks` hook, sink precedence, `--dist=loadgroup` vs default `load` guidance, and a "Durability limitations" section (workeroutput delivers at worker shutdown; an over-cap payload is dropped wholesale — durable per-worker shards are a stacked follow-up) - Configuration, CI-integration, pytest-integration, results-and-reporting, and API reference pages updated to describe the new option (under a dedicated "Pytest Options" section, not under env vars) - Architecture page notes the controller/worker split **Incidental** - `onedrive.py`: file-level pyright directive suppressing the `Unknown*` cascade caused by `msgraph-sdk` shipping without type stubs. No behavior change. - `_xdist.py`: `# ty: ignore[unresolved-attribute]` on the pytest-xdist runtime `config.workeroutput` attribute so `ty check` passes under the repo's pyright → ty migration. ### Security notes The xdist boundary treats worker output as untrusted: - All values pass through `_sanitize` → JSON-safe primitives only - Strings are stripped of the full ECMA-48 escape family on deserialize (CSI, OSC, DCS/SOS/PM/APC, 7-bit and 8-bit C1, plus residual C0/C1 control bytes), including nested strings inside dicts/lists, to prevent terminal injection (e.g. OSC hyperlinks/title sets) from a compromised or misbehaving worker. The sanitizer has no catastrophic-backtracking exposure. - Total payload size is capped to prevent controller memory exhaustion; truncation is recorded with a marker and raised as `SizeLimitError` - Depth cap (`MAX_METADATA_DEPTH = 6`) prevents pathological nesting ### Validation - `uv run ruff check rampart tests` → all checks pass; `ruff format --check` clean - `uv run ty check` → all checks passed - `uv run pytest tests/unit -m "not slow"` → 597 passed - `uv run pytest tests/unit/pytest_plugin/test_xdist_aggregation.py -m slow` → 13 passed (trial-group verdicts verified under `--dist=loadgroup` and `--dist=load`) - `uv run --group docs mkdocs build --strict` → no cross-reference warnings (remaining output is Windows-only symlink noise from the font-download plugin; clean on CI/Linux) - Ran `pytest -n 4 --dist=loadgroup` against the HelpDesk Bot example in `rampart-examples`: 1 report generated. Running with xdist took ~99.66s versus ~230.73s serial (yay for speed!) ## Breaking changes None ## Checklist - [x] `pre-commit run --all-files` passes - [x] Tests added or updated for changes - [x] Documentation updated --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
….19 to 0.15.20 (microsoft#101) Bumps [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit) from v0.15.19 to 0.15.20. This release includes the previously tagged commit. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff-pre-commit/releases">https://github.com/astral-sh/ruff-pre-commit's releases</a>.</em></p> <blockquote> <h2>v0.15.20</h2> <p>See: <a href="https://github.com/astral-sh/ruff/releases/tag/0.15.20">https://github.com/astral-sh/ruff/releases/tag/0.15.20</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/astral-sh/ruff-pre-commit/commit/c59bba8fb259db0fec2bbb77ad8ba51ea7341b56"><code>c59bba8</code></a> Mirror: 0.15.20</li> <li>See full diff in <a href="https://github.com/astral-sh/ruff-pre-commit/compare/745be0411e3c150e246d527e531e5a221b8c3462...c59bba8fb259db0fec2bbb77ad8ba51ea7341b56">compare view</a></li> </ul> </details> <br /> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ates (microsoft#102) Bumps the minor-and-patch group with 2 updates in the / directory: [ruff](https://github.com/astral-sh/ruff) and [ty](https://github.com/astral-sh/ty). Updates `ruff` from 0.15.19 to 0.15.20 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/releases">ruff's releases</a>.</em></p> <blockquote> <h2>0.15.20</h2> <h2>Release Notes</h2> <p>Released on 2026-06-25.</p> <h3>Preview features</h3> <ul> <li>Allow human-readable names in rule selectors (<a href="https://redirect.github.com/astral-sh/ruff/pull/25887">#25887</a>)</li> <li>Emit a warning instead of an error for unknown rule selectors (<a href="https://redirect.github.com/astral-sh/ruff/pull/26113">#26113</a>)</li> <li>Match <code>noqa</code> shebang handling in <code>ruff:ignore</code> comments (<a href="https://redirect.github.com/astral-sh/ruff/pull/26286">#26286</a>)</li> <li>[<code>ruff</code>] Remove <code>pytest-fixture-autouse</code> (<code>RUF076</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/26240">#26240</a>, <a href="https://redirect.github.com/astral-sh/ruff/pull/26371">#26371</a>)</li> </ul> <h3>Documentation</h3> <ul> <li>Add versioning sections to custom crate READMEs (<a href="https://redirect.github.com/astral-sh/ruff/pull/26317">#26317</a>)</li> <li>Update <code>ruff_python_parser</code> README for crates.io (<a href="https://redirect.github.com/astral-sh/ruff/pull/26315">#26315</a>)</li> <li>[<code>perflint</code>] Clarify that <code>PERF402</code> applies to any iterable (<a href="https://redirect.github.com/astral-sh/ruff/pull/26242">#26242</a>)</li> </ul> <h3>Contributors</h3> <ul> <li><a href="https://github.com/dhruvmanila"><code>@dhruvmanila</code></a></li> <li><a href="https://github.com/MichaReiser"><code>@MichaReiser</code></a></li> <li><a href="https://github.com/ntBre"><code>@ntBre</code></a></li> <li><a href="https://github.com/trilamsr"><code>@trilamsr</code></a></li> </ul> <h2>Install ruff 0.15.20</h2> <h3>Install prebuilt binaries via shell script</h3> <pre lang="sh"><code>curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.20/ruff-installer.sh | sh </code></pre> <h3>Install prebuilt binaries via powershell script</h3> <pre lang="sh"><code>powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.20/ruff-installer.ps1 | iex" </code></pre> <h2>Download ruff 0.15.20</h2> <table> <thead> <tr> <th>File</th> <th>Platform</th> <th>Checksum</th> </tr> </thead> <tbody> <tr> <td><a href="https://releases.astral.sh/github/ruff/releases/download/0.15.20/ruff-aarch64-apple-darwin.tar.gz">ruff-aarch64-apple-darwin.tar.gz</a></td> <td>Apple Silicon macOS</td> <td><a href="https://releases.astral.sh/github/ruff/releases/download/0.15.20/ruff-aarch64-apple-darwin.tar.gz.sha256">checksum</a></td> </tr> <tr> <td><a href="https://releases.astral.sh/github/ruff/releases/download/0.15.20/ruff-x86_64-apple-darwin.tar.gz">ruff-x86_64-apple-darwin.tar.gz</a></td> <td>Intel macOS</td> <td><a href="https://releases.astral.sh/github/ruff/releases/download/0.15.20/ruff-x86_64-apple-darwin.tar.gz.sha256">checksum</a></td> </tr> <tr> <td><a href="https://releases.astral.sh/github/ruff/releases/download/0.15.20/ruff-aarch64-pc-windows-msvc.zip">ruff-aarch64-pc-windows-msvc.zip</a></td> <td>ARM64 Windows</td> <td><a href="https://releases.astral.sh/github/ruff/releases/download/0.15.20/ruff-aarch64-pc-windows-msvc.zip.sha256">checksum</a></td> </tr> <tr> <td><a href="https://releases.astral.sh/github/ruff/releases/download/0.15.20/ruff-i686-pc-windows-msvc.zip">ruff-i686-pc-windows-msvc.zip</a></td> <td>x86 Windows</td> <td><a href="https://releases.astral.sh/github/ruff/releases/download/0.15.20/ruff-i686-pc-windows-msvc.zip.sha256">checksum</a></td> </tr> <tr> <td><a href="https://releases.astral.sh/github/ruff/releases/download/0.15.20/ruff-x86_64-pc-windows-msvc.zip">ruff-x86_64-pc-windows-msvc.zip</a></td> <td>x64 Windows</td> <td><a href="https://releases.astral.sh/github/ruff/releases/download/0.15.20/ruff-x86_64-pc-windows-msvc.zip.sha256">checksum</a></td> </tr> <tr> <td><a href="https://releases.astral.sh/github/ruff/releases/download/0.15.20/ruff-aarch64-unknown-linux-gnu.tar.gz">ruff-aarch64-unknown-linux-gnu.tar.gz</a></td> <td>ARM64 Linux</td> <td><a href="https://releases.astral.sh/github/ruff/releases/download/0.15.20/ruff-aarch64-unknown-linux-gnu.tar.gz.sha256">checksum</a></td> </tr> <tr> <td><a href="https://releases.astral.sh/github/ruff/releases/download/0.15.20/ruff-i686-unknown-linux-gnu.tar.gz">ruff-i686-unknown-linux-gnu.tar.gz</a></td> <td>x86 Linux</td> <td><a href="https://releases.astral.sh/github/ruff/releases/download/0.15.20/ruff-i686-unknown-linux-gnu.tar.gz.sha256">checksum</a></td> </tr> </tbody> </table> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's changelog</a>.</em></p> <blockquote> <h2>0.15.20</h2> <p>Released on 2026-06-25.</p> <h3>Preview features</h3> <ul> <li>Allow human-readable names in rule selectors (<a href="https://redirect.github.com/astral-sh/ruff/pull/25887">#25887</a>)</li> <li>Emit a warning instead of an error for unknown rule selectors (<a href="https://redirect.github.com/astral-sh/ruff/pull/26113">#26113</a>)</li> <li>Match <code>noqa</code> shebang handling in <code>ruff:ignore</code> comments (<a href="https://redirect.github.com/astral-sh/ruff/pull/26286">#26286</a>)</li> <li>[<code>ruff</code>] Remove <code>pytest-fixture-autouse</code> (<code>RUF076</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/26240">#26240</a>, <a href="https://redirect.github.com/astral-sh/ruff/pull/26371">#26371</a>)</li> </ul> <h3>Documentation</h3> <ul> <li>Add versioning sections to custom crate READMEs (<a href="https://redirect.github.com/astral-sh/ruff/pull/26317">#26317</a>)</li> <li>Update <code>ruff_python_parser</code> README for crates.io (<a href="https://redirect.github.com/astral-sh/ruff/pull/26315">#26315</a>)</li> <li>[<code>perflint</code>] Clarify that <code>PERF402</code> applies to any iterable (<a href="https://redirect.github.com/astral-sh/ruff/pull/26242">#26242</a>)</li> </ul> <h3>Contributors</h3> <ul> <li><a href="https://github.com/dhruvmanila"><code>@dhruvmanila</code></a></li> <li><a href="https://github.com/MichaReiser"><code>@MichaReiser</code></a></li> <li><a href="https://github.com/ntBre"><code>@ntBre</code></a></li> <li><a href="https://github.com/trilamsr"><code>@trilamsr</code></a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/astral-sh/ruff/commit/f82a36b6baf8c0547a17bbde6c0d927ccd45d938"><code>f82a36b</code></a> Bump 0.15.20 (<a href="https://redirect.github.com/astral-sh/ruff/issues/26376">#26376</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/af329438b55d5aa8ca28725f17abbae63b5c815d"><code>af32943</code></a> Improve the summarise-ecosystem-results skill (<a href="https://redirect.github.com/astral-sh/ruff/issues/26378">#26378</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/485ebab5de692aad34720898cd80245b6092ba86"><code>485ebab</code></a> Remove <code>RUF076</code> name from schema (<a href="https://redirect.github.com/astral-sh/ruff/issues/26371">#26371</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/ef81835ce3da615346584dc446de0fe26bfc154b"><code>ef81835</code></a> [ty] Implement rust-analyzer's "Click for full compiler diagnostic" feature (...</li> <li><a href="https://github.com/astral-sh/ruff/commit/572b31e2377a701a7365f069f6ef87002962cb2b"><code>572b31e</code></a> [<code>ruff</code>] Remove <code>pytest-fixture-autouse</code> (<code>RUF076</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/26240">#26240</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/f703f219d7fddd1a4abba9fa81e34773c185a4b9"><code>f703f21</code></a> Allow human-readable names in rule selectors (<a href="https://redirect.github.com/astral-sh/ruff/issues/25887">#25887</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/0d726b28ee35413926145ffef4ac1143cae9ea1e"><code>0d726b2</code></a> [ty] Reuse equality semantics for membership compatibility (<a href="https://redirect.github.com/astral-sh/ruff/issues/25955">#25955</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/dbe6e9848c3f78fdaf543cfc000939ebc73b5f00"><code>dbe6e98</code></a> [ty] Infer definite equality comparison results (<a href="https://redirect.github.com/astral-sh/ruff/issues/26337">#26337</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/e700ea357a2196d76b58eb89b2031ddb5ca896e0"><code>e700ea3</code></a> [ty] Prove TypedDict structural patterns exhaustive (<a href="https://redirect.github.com/astral-sh/ruff/issues/26285">#26285</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/6a0d2ec93959d966430b8c39d4de5c3e8a88e911"><code>6a0d2ec</code></a> [ty] Widen inferred class-valued instance attributes (<a href="https://redirect.github.com/astral-sh/ruff/issues/26338">#26338</a>)</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/ruff/compare/0.15.19...0.15.20">compare view</a></li> </ul> </details> <br /> Updates `ty` from 0.0.53 to 0.0.56 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ty/releases">ty's releases</a>.</em></p> <blockquote> <h2>0.0.56</h2> <h2>Release Notes</h2> <p>Released on 2026-07-01.</p> <h3>Bug fixes</h3> <ul> <li>Avoid MRO cycle when collecting NamedTuple fields (<a href="https://redirect.github.com/astral-sh/ruff/pull/26464">#26464</a>)</li> <li>Model <code>int</code> and <code>str</code> enum value normalization (<a href="https://redirect.github.com/astral-sh/ruff/pull/26349">#26349</a>)</li> <li>Prefer reflected operators by runtime class (<a href="https://redirect.github.com/astral-sh/ruff/pull/26434">#26434</a>, <a href="https://redirect.github.com/astral-sh/ruff/pull/26474">#26474</a>)</li> </ul> <h3>CLI</h3> <ul> <li>Exit with status 130 when interrupted (<a href="https://redirect.github.com/astral-sh/ruff/pull/26465">#26465</a>)</li> </ul> <h3>Performance</h3> <ul> <li>Avoid exponential OR-pattern reachability (<a href="https://redirect.github.com/astral-sh/ruff/pull/26481">#26481</a>)</li> <li>Reduce bound typevar identity overhead (<a href="https://redirect.github.com/astral-sh/ruff/pull/26396">#26396</a>)</li> </ul> <h3>Core type checking</h3> <ul> <li>Infer generic class pattern capture types (<a href="https://redirect.github.com/astral-sh/ruff/pull/26479">#26479</a>)</li> <li>Narrow exact tuples through sequence patterns (<a href="https://redirect.github.com/astral-sh/ruff/pull/26424">#26424</a>)</li> <li>Recognize inherited enum member constructors (<a href="https://redirect.github.com/astral-sh/ruff/pull/26410">#26410</a>)</li> <li>Respect return-context inference when filtering overloads (<a href="https://redirect.github.com/astral-sh/ruff/pull/26454">#26454</a>)</li> <li>Sync vendored typeshed stubs (<a href="https://redirect.github.com/astral-sh/ruff/pull/26501">#26501</a>). <a href="https://github.com/python/typeshed/compare/3c6221722aac5bd9dbfc5fbf7b4f0bf64b2c5724...b9090e99745ac1511d8efd828622b11a9a3623e8">Typeshed diff</a></li> </ul> <h3>Contributors</h3> <ul> <li><a href="https://github.com/charliermarsh"><code>@charliermarsh</code></a></li> <li><a href="https://github.com/sharkdp"><code>@sharkdp</code></a></li> </ul> <h2>Install ty 0.0.56</h2> <h3>Install prebuilt binaries via shell script</h3> <pre lang="sh"><code>curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.56/ty-installer.sh | sh </code></pre> <h3>Install prebuilt binaries via powershell script</h3> <pre lang="sh"><code>powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.56/ty-installer.ps1 | iex" </code></pre> <h2>Download ty 0.0.56</h2> <p>| File | Platform | Checksum |</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ty/blob/main/CHANGELOG.md">ty's changelog</a>.</em></p> <blockquote> <h2>0.0.56</h2> <p>Released on 2026-07-01.</p> <h3>Bug fixes</h3> <ul> <li>Avoid MRO cycle when collecting NamedTuple fields (<a href="https://redirect.github.com/astral-sh/ruff/pull/26464">#26464</a>)</li> <li>Model <code>int</code> and <code>str</code> enum value normalization (<a href="https://redirect.github.com/astral-sh/ruff/pull/26349">#26349</a>)</li> <li>Prefer reflected operators by runtime class (<a href="https://redirect.github.com/astral-sh/ruff/pull/26434">#26434</a>, <a href="https://redirect.github.com/astral-sh/ruff/pull/26474">#26474</a>)</li> </ul> <h3>CLI</h3> <ul> <li>Exit with status 130 when interrupted (<a href="https://redirect.github.com/astral-sh/ruff/pull/26465">#26465</a>)</li> </ul> <h3>Performance</h3> <ul> <li>Avoid exponential OR-pattern reachability (<a href="https://redirect.github.com/astral-sh/ruff/pull/26481">#26481</a>)</li> <li>Reduce bound typevar identity overhead (<a href="https://redirect.github.com/astral-sh/ruff/pull/26396">#26396</a>)</li> </ul> <h3>Core type checking</h3> <ul> <li>Infer generic class pattern capture types (<a href="https://redirect.github.com/astral-sh/ruff/pull/26479">#26479</a>)</li> <li>Narrow exact tuples through sequence patterns (<a href="https://redirect.github.com/astral-sh/ruff/pull/26424">#26424</a>)</li> <li>Recognize inherited enum member constructors (<a href="https://redirect.github.com/astral-sh/ruff/pull/26410">#26410</a>)</li> <li>Respect return-context inference when filtering overloads (<a href="https://redirect.github.com/astral-sh/ruff/pull/26454">#26454</a>)</li> <li>Sync vendored typeshed stubs (<a href="https://redirect.github.com/astral-sh/ruff/pull/26501">#26501</a>). <a href="https://github.com/python/typeshed/compare/3c6221722aac5bd9dbfc5fbf7b4f0bf64b2c5724...b9090e99745ac1511d8efd828622b11a9a3623e8">Typeshed diff</a></li> </ul> <h3>Contributors</h3> <ul> <li><a href="https://github.com/charliermarsh"><code>@charliermarsh</code></a></li> <li><a href="https://github.com/sharkdp"><code>@sharkdp</code></a></li> </ul> <h2>0.0.55</h2> <p>Released on 2026-06-26.</p> <h3>LSP server</h3> <ul> <li>Render full diagnostics in color (<a href="https://redirect.github.com/astral-sh/ruff/pull/26384">#26384</a>)</li> </ul> <h3>Documentation</h3> <ul> <li>Document colored diagnostic output (<a href="https://redirect.github.com/astral-sh/ty/pull/3858">#3858</a>)</li> </ul> <h3>Performance</h3> <ul> <li>Improve vendored filesystem concurrency (<a href="https://redirect.github.com/astral-sh/ruff/pull/26408">#26408</a>)</li> <li>Optimize enum comparisons in equality evaluation (<a href="https://redirect.github.com/astral-sh/ruff/pull/26340">#26340</a>)</li> <li>Remove redundant semantic index shrinks (<a href="https://redirect.github.com/astral-sh/ruff/pull/26392">#26392</a>)</li> <li>Use never-change durability for one-shot checks (<a href="https://redirect.github.com/astral-sh/ruff/pull/26359">#26359</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/astral-sh/ty/commit/3078f9fa24e7db72b1442d1cae165eaf9ff395ae"><code>3078f9f</code></a> Bump version to 0.0.56 (<a href="https://redirect.github.com/astral-sh/ty/issues/3895">#3895</a>)</li> <li><a href="https://github.com/astral-sh/ty/commit/5336bc5a7334146b9d7bbaba6f4563c8e8356a5e"><code>5336bc5</code></a> Update maturin to v1.14.1 (<a href="https://redirect.github.com/astral-sh/ty/issues/3883">#3883</a>)</li> <li><a href="https://github.com/astral-sh/ty/commit/352d5b7e807c47b7329716df31f5cb1428baeaad"><code>352d5b7</code></a> Update prek dependencies (<a href="https://redirect.github.com/astral-sh/ty/issues/3884">#3884</a>)</li> <li><a href="https://github.com/astral-sh/ty/commit/0211cc927cb082d666ecd959a760074758344eb1"><code>0211cc9</code></a> Update actions/cache action to v6 (<a href="https://redirect.github.com/astral-sh/ty/issues/3885">#3885</a>)</li> <li><a href="https://github.com/astral-sh/ty/commit/b75a2f40b8052960d1c55fd0b6592b256dca2699"><code>b75a2f4</code></a> Update actions/checkout action to v7 (<a href="https://redirect.github.com/astral-sh/ty/issues/3886">#3886</a>)</li> <li><a href="https://github.com/astral-sh/ty/commit/42869400da56f4ee7ce752141f81b50bb318e4e2"><code>4286940</code></a> Bump version to 0.0.55 (<a href="https://redirect.github.com/astral-sh/ty/issues/3866">#3866</a>)</li> <li><a href="https://github.com/astral-sh/ty/commit/5374b30ff462ef6e59d23dc9ba515007b02464a8"><code>5374b30</code></a> Update benchmarks for ty 0.0.54 (<a href="https://redirect.github.com/astral-sh/ty/issues/3865">#3865</a>)</li> <li><a href="https://github.com/astral-sh/ty/commit/3ed874d053ff9529c9fd0205a6d3bbe6a7407535"><code>3ed874d</code></a> Document colored diagnostic output (<a href="https://redirect.github.com/astral-sh/ty/issues/3858">#3858</a>)</li> <li><a href="https://github.com/astral-sh/ty/commit/bf8a7dd584f53d67d873c750afc1494331f93502"><code>bf8a7dd</code></a> Bump version to 0.0.54</li> <li><a href="https://github.com/astral-sh/ty/commit/78e094dfaf6245514f124b043b18c9a20edd8f08"><code>78e094d</code></a> Document the <code>fullDiagnosticOutput</code> extension to the Language Server Protocol...</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/ty/compare/0.0.53...0.0.56">compare view</a></li> </ul> </details> <br /> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
) ## Description Drop references to `pyright` following microsoft#86. Some other refs dropped in microsoft#103 too. This PR gets the rest (which are only in `rampart/surfaces/onedrive.py`. ## Breaking changes None ## Checklist - [X] `pre-commit run --all-files` passes - [ ] Tests added or updated for changes <!-- Please describe what tests were added or updated --> - [ ] Documentation updated
The pytest_rampart_sinks hook is the supported sink registration API. Resolving the legacy rampart_sinks fixture - in the single-process bootstrap and in controller-side discovery - now emits a DeprecationWarning pointing users to the hook, scheduled for removal in 1.0.0. Adds rampart/common/deprecation.py (mirrors PyRIT's print_deprecation_message), wires it into both fixture-consumption paths, documents the deprecation in the pytest-integration and xdist guides, and adds unit + pytester coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nina-msft
force-pushed
the
dev/nina-msft/deprecate-sinks-fixture
branch
from
July 7, 2026 21:45
048c9b7 to
6de45a8
Compare
Owner
Author
|
Superseded by microsoft#105, which targets microsoft/RAMPART:main directly (this draft's base, dev/nina-msft/8259, merged via microsoft#73). The branch was rebased onto the merged main and re-validated under ty. Closing in favor of microsoft#105. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to microsoft#73, stacked on its branch (
dev/nina-msft/8259). Now that thepytest_rampart_sinkshook is the supported sink-registration API, this PRbegins deprecating the legacy
rampart_sinksfixture.Resolving the fixture now emits a
DeprecationWarning(removal target:1.0.0)in both fixture-consumption paths:
_rampart_sink_bootstrap, after the fixture resolves._resolve_sink_candidate, when it unwraps a genuine@pytest.fixture-formrampart_sinks(not module-level lists or plaincallables).
The hook stays authoritative and the fixture remains a single-process fallback,
so nothing breaks for existing users — they just get a migration nudge.
Changes
rampart/common/deprecation.py—print_deprecation_message(...),mirroring PyRIT's helper (qualified-name resolution +
DeprecationWarningatstacklevel=3).plugin.pyand_xdist.pyfixture-resolution paths.usage/pytest-integration.mdandusage/xdist.md.tests/unit/common/test_deprecation.py; controller-path warn / no-warntests in
test_xdist.py; single-process pytester assertion in the slowaggregation suite.
Validation
ruff check/ruff format --check/pyrightclean on changed files.144 passedacross the fast plugin / xdist / common unit suites.Notes
pytest-xdistsupport for distributed test execution microsoft/RAMPART#73 branch so it can be reviewed now; rebase ontomainonce [FEAT]:pytest-xdistsupport for distributed test execution microsoft/RAMPART#73merges.
removed_in="1.0.0"is the assumed removal milestone (package is pre-1.0).@bashirpartovi.