playwright-roll

Installation
SKILL.md

Rolling Playwright Python

The goal of a roll is to move driver_version in setup.py to a new release, port every public API change introduced upstream during that interval, and suppress the rest, so that ./scripts/update_api.sh runs clean and the test suite still passes.

The previous human-facing summary lives in ../../../ROLLING.md. This skill is the operational playbook — read it end to end before starting.

Mental model

The Python port is hand-written code in playwright/_impl/, plus a generator (scripts/generate_*.py, scripts/documentation_provider.py) that:

  1. introspects the Python _impl classes via inspect,
  2. emits typed wrapper classes into playwright/{async,sync}_api/_generated.py, and
  3. diffs the introspected surface against playwright/driver/package/api.json (downloaded inside the new driver wheel).

Anything in api.json that is missing or differently typed in _impl/ causes generation to fail. Three resolutions:

  • PORT — the new API is intended for Python (no langs.only filter, or langs.only includes "python"). Implement it in _impl/.
  • MISMATCH — the API genuinely exists for Python but is shaped differently (a callback signature uses unions, a kwarg uses a legacy name, etc.) and there's a justified reason to keep the divergence. Add a precise line to scripts/expected_api_mismatch.txt with a comment explaining why.
  • N/A — the commit only touches docs, has * langs: js (or any other filter that excludes Python), is server-side, Electron-only, or was reverted later in the same release. No action.
Installs
4
GitHub Stars
14.6K
First Seen
Feb 2, 2026