Skip to content

Fix compatibility with pytest>=9.0.0 by updating syrupy#24

Open
mrossinek wants to merge 1 commit intoTextualize:mainfrom
mrossinek:update-syrupy
Open

Fix compatibility with pytest>=9.0.0 by updating syrupy#24
mrossinek wants to merge 1 commit intoTextualize:mainfrom
mrossinek:update-syrupy

Conversation

@mrossinek
Copy link
Copy Markdown

syrupy>=5.0.0 is required to support pytest>=9.0.0. This PR updates the minimum required version. Its version was originally pinned by #17 to avoid disappearance of the private method _read_snapshot_data_from_location which has been made part of syrupy's public API in version 5.0.0, hence I'm updating the version specifier to a lower bound rather than hard pin, in-line with the other dependency version specifiers.


Syrupy dropped support for Python 3.8 and officially requires Python 3.10. I did not yet update the Python version requirements here, but we may wish to do so before merging this.


I have verified this change by running textual latests snapshot tests and all tests pass (but I skipped those with the syntax marker).

@mrossinek mrossinek changed the title Update syrupy Fix compatibility with pytest>=9.0.0 by updating syrupy Dec 1, 2025
josh-iterabloom pushed a commit to iterabloom/hypergumbo that referenced this pull request Apr 14, 2026
…ignore

The pip-audit step had two --ignore-vuln entries:

1. CVE-2026-4539 (pygments AdlLexer ReDoS) — **dropped**. This entry was
   added when pygments 2.19.2 was the latest version (the comment literally
   said "no upstream fix available yet — latest version"). Our
   hypergumbo-core and hypergumbo-tracker pyproject.toml files now pin
   `pygments~=2.20.0`, which is past the vulnerable range. Verified:
   `pip-audit` against a fresh env with pygments 2.20.0 installed reports
   no vulnerabilities. The ignore was stale.

2. CVE-2025-71176 (pytest /tmp/pytest-of-{user} TOCTOU) — **kept**, with
   expanded rationale in the comment block. Fix is pytest 9.0.3, but
   syrupy 4.8.0 (hard-pinned by pytest-textual-snapshot==1.1.0) caps
   pytest<9.0.0, so we cannot reach 9.0.3 without forking the upstream.
   Upstream PR Textualize/pytest-textual-snapshot#24
   relaxes the syrupy pin to >=5.0.0, which would let us bump pytest and
   drop this ignore.

   Impact assessment for hypergumbo:
     * Local-only attack boundary (requires shell on the same UNIX box).
     * pytest is dev-only — never shipped to end users running hypergumbo.
     * Self-hosted CI runners are single-tenant, so no co-tenant risk.
     * Practical exploitability is effectively zero.

Tracked in WI-zokan for automatic revert once upstream PR #24 lands.

Signed-off-by: jgstern-agent <josh-agent@iterabloom.com>
josh-iterabloom pushed a commit to iterabloom/hypergumbo that referenced this pull request Apr 22, 2026
`ci.yml:287` runs `pip-audit --skip-editable --ignore-vuln CVE-2025-71176`
with a comment block explaining the carve-out. `release.yml:103` was
running `pip-audit --skip-editable` only — so every release attempt
failed the security gate on the identical known advisory that CI has
already decided to accept.

On the 2.7.0 release, this was the failure: `release.yml`'s
`security-audit` step reported

    Found 1 known vulnerability in 1 package
    Name   Version ID             Fix Versions
    ------ ------- -------------- ------------
    pytest 9.0.2   CVE-2025-71176 9.0.3

after the `v2.7.0` tag had already been pushed and the release PR
(#3276) had already merged to main.

Fix: copy the exact `--ignore-vuln CVE-2025-71176` flag and the full
rationale comment from `ci.yml:276–287` into `release.yml:102–115`.
The comment documents: CVE is a /tmp/pytest-of-{user} TOCTOU on UNIX;
fix is pytest 9.0.3, transitively blocked by syrupy 4.8.0 (hard-pinned
by pytest-textual-snapshot 1.1.0); attack boundary is local CI/dev
only (pytest is a dev dep, never installed on end-user systems);
single-tenant self-hosted runner means practical exploitability is
~0; exit plan is upstream PR
Textualize/pytest-textual-snapshot#24. When
that merges and a new pytest-textual-snapshot release ships, both
ci.yml and release.yml drop the ignore together.

Rerun path after merge: workflow-dispatch `release.yml` on `main`
with input `version=2.7.0`. The `v2.7.0` tag already points at
main's current HEAD (the release PR merge commit `a0f3ac12e`), so
a rerun publishes the same release artifacts that the tag-push
trigger would have published if the audit had passed the first time.

Signed-off-by: jgstern-agent <josh-agent@iterabloom.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant