Skip to content

chore(deps): move benchmark deps to PEP 723 scripts, patch vulns#63

Merged
thomasht86 merged 1 commit intomainfrom
thomasht86/dependencies
May 6, 2026
Merged

chore(deps): move benchmark deps to PEP 723 scripts, patch vulns#63
thomasht86 merged 1 commit intomainfrom
thomasht86/dependencies

Conversation

@thomasht86
Copy link
Copy Markdown
Owner

Summary

  • Move benchmark/*.py to PEP 723 inline scripts so their deps (aiohttp, requests, jupyter chain, matplotlib, pandas, fastapi, …) never enter uv.lock. Run with uv run --script benchmark/<file>.py.
  • Drop the [imaging] extra on mkdocs-material — pillow + cairosvg were only there for social-card generation, but no social: plugin is configured in mkdocs.yml.
  • Bump pytest>=9.0.3 (kept 8.x conditional for Py 3.9 since 9.x dropped 3.9 support); uv lock --upgrade for cryptography/filelock/certifi.
  • cargo update for rustls-webpki 0.103.13, rand 0.8.6/0.9.4, time 0.3.47, bytes 1.11.1, tokio 1.52.2 — all transitive.

Vulnerability impact

Of the 35 open alerts on main, this branch closes:

  • All 6 pillow alerts (was via matplotlib + mkdocs-material[imaging])
  • All 10 aiohttp alerts + requests (was direct in [benchmark])
  • jupyterlab/notebook/nbconvert/Pygments (was via jupyter in [benchmark])
  • pytest, cryptography, filelock (Py>=3.10)
  • All open Rust alerts: rustls-webpki, rand, time, bytes

Remaining: filelock 3.19.x for Py 3.9 only (3.20+ requires Py>=3.10) — dev-only, no runtime exposure.

Test plan

  • lint job (ruff + mypy + cargo fmt + clippy)
  • test matrix across Py 3.9–3.14
  • e2e job (httpbun container)
  • docs build (verifies the dropped [imaging] extra is OK)

🤖 Generated with Claude Code

…g], patch vulns

Goal: shrink the surface area surfaced by Dependabot from 30+ open alerts
down to those that actually ship to users.

Benchmark group → PEP 723 inline scripts
- benchmark/server.py, benchmark.py, benchmark_cbor.py, generate_image.py
  now declare deps via `# /// script` blocks and run with
  `uv run --script benchmark/<file>.py`.
- Removed the `[benchmark]` optional-deps group from pyproject.toml.
- uv.lock loses ~4300 lines (aiohttp, requests, jupyter chain, matplotlib,
  pandas, fastapi, gunicorn, …), eliminating 16 transitive alerts.
- CI.yml/benchmark.yml updated: server boots via the inline script, env
  vars BENCHMARK_HOST/BENCHMARK_PORT control the bind address.

Docs group
- Drop the `[imaging]` extra on mkdocs-material — pillow + cairosvg were
  only there for social-card generation, but no `social:` plugin is
  configured in mkdocs.yml. Removes 6 pillow alerts from the lock.

Real vuln fixes
- pytest>=9.0.3 (CVE-listed alert #65); kept 8.x conditional for Py 3.9
  since 9.x dropped 3.9 support.
- `uv lock --upgrade` brings cryptography>=47, filelock>=3.29 (Py>=3.10),
  certifi 2026.4.22.
- `cargo update` brings rustls-webpki 0.103.13, rand 0.8.6/0.9.4,
  time 0.3.47, bytes 1.11.1, tokio 1.52.2 — all transitive,
  Cargo.toml unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thomasht86 thomasht86 marked this pull request as ready for review May 6, 2026 08:35
@thomasht86 thomasht86 merged commit f98c49e into main May 6, 2026
18 checks passed
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