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
{{ message }}
Repository navigation
Commit 5cf76bd
Browse filesBrowse the repository at this point in the historyBrowse files
There is sometimes no `vX.Y.0` tag for the latest release (the bots cut release branches first and tag later). Anchor on commits, not tags.
102
-
103
-
The diff range is "every commit on the new release branch since the previous release was cut". Anchor commits:
104
-
105
-
-**Previous release end**: the `chore: bump version to vX.Y.0-next` commit on `main`. That commit is the first commit *after* the previous release (X.Y-1) was cut. Use its parent (`<sha>~1`) as the lower bound.
106
-
```sh
107
-
git -C "$PW_SRC_DIR" log --all --grep="bump version to v" --oneline | head
108
-
```
109
-
-**New release end**: the tip of `release-<new>` (or the matching tag if it exists).
110
-
111
-
Save the commit list, oldest first, scoped to `docs/src/api/`:
92
+
The range is every commit between the old `rev=` (in `DRIVER_VERSION` before the
93
+
bump) and the new one. Save the commit list, oldest first, scoped to
A normal roll yields 50–100 commits. If you see 0 or thousands, the range is wrong.
100
+
If the old `DRIVER_VERSION` has no `rev=` line (rolls before the two-line
101
+
format), take the old commit from npm: `npm view playwright-core@<oldversion>
102
+
gitHead`. A release-to-release roll yields 50–100 commits; a nightly-to-nightly
103
+
roll a handful. If you see thousands, the range is wrong.
118
104
119
105
Format the file as a markdown checklist and add the standard preamble (status legend, where to look up `api.json` etc.) — see the file from the 1.58→1.59 roll for the template.
120
106
@@ -266,7 +252,7 @@ Failure modes and fixes:
266
252
| mypy: incompatible argument type in `_generated.py`| The docs type changed, or `_impl/` declares a narrower type. | Match the type in `_impl/`, or fix the docs with a Python-only declaration (`* langs: python`). |
267
253
| generator: `No Python name for the struct at X.y.z`| A new inline `[Object]` with no name in the docs. | Name it in the docs: `` "Name" <[Object]> ``. |
268
254
| generator: `The struct X has different fields at A and B`| Two places in the docs share one struct name, but their fields differ. | Give one place its own name in the docs. |
269
-
|`_generated.py` gains or loses members that the commit walk never mentioned |`PW_SRC_DIR` is not on `release-<new>` (for example on `main`or a feature branch), or is behind `origin/release-<new>`. |Run the checkout checks from step 2, fix the checkout, regenerate. |
255
+
|`_generated.py` gains or loses members that the commit walk never mentioned |`PW_SRC_DIR` is not at the `rev=` commit, or the range of the walk is wrong. |Check out `rev=` (step 2), regenerate, and recompute the range (step 3). |
270
256
| generator: `Unknown docs type "T" at X.y`| A docs type the type table in `generate_api.js` (`toPy`) does not know. | Add it to `toPy`. |
271
257
| generator: `required parameter z follows an optional one`| The docs order params so that Python would need a default before a non-default. | Fix the docs, for example with a Python-only `### param:` or `### option:`, as `select_option(value)` has. |
272
258
| generator: `the entry "…" no longer matches anything; remove it`| An upstream change made a rules entry unnecessary (or renamed what it points at). | Delete it, or re-key it to the new docs name. |
@@ -300,7 +286,7 @@ For each PORT, port the upstream test that covers it, as an async test and a mat
300
286
301
287
### 8. Final verification
302
288
303
-
Repeat the checkout checks from step 2: the committed `_generated.py` must come from `release-<new>`.
289
+
Check that `$PW_SRC_DIR` is still at the `rev=` commit, with no local changes: the committed `_generated.py` must come from it.
Copy file name to clipboardExpand all lines: AGENTS.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,10 +18,10 @@ Python bindings for [Playwright](https://playwright.dev). The Python client talk
18
18
-`_protocol.py` has the parameters of every command. With `PW_CHECK_PROTOCOL=1`, `playwright/_impl/_protocol_check.py` checks each message that the client sends against it. The test suite sets this, and fails a test that sends an unknown command, an unknown or missing parameter, or a value of the wrong type.
19
19
-`scripts/codegen/compare_api.py` — compares two generated files (signatures, annotations, call bodies, docstrings) and lists every difference. Use it to check that a generator change does not change the API.
20
20
-`tests/async/`, `tests/sync/` — pytest suites, ported from the upstream tests. Most new tests are added to the async file with a sync mirror. See [Tests](#tests).
21
-
-`DRIVER_VERSION` — the single source of truth for which Playwright release the driver is assembled from (one line, the `playwright-core` npm version, e.g. `1.61.0`, no `v` prefix). Read by `setup.py`, `scripts/build_driver.py`, and CI. The wheel build downloads `playwright-core` at this version from npm plus the matching Node.js binary and assembles the per-platform bundles — no source build. The version is baked into the staged bundle filenames (`driver/playwright-<version>-<suffix>.zip`), so it doubles as the build cache key.
21
+
-`DRIVER_VERSION` — the single source of truth for which Playwright build the driver is assembled from. Two lines: `npm=<version>`, the `playwright-core` npm version (e.g. `npm=1.61.0`, no `v` prefix), and `rev=<sha>`, the `microsoft/playwright` commit that the package is built from (`npm view playwright-core@<version> gitHead`). Read by `setup.py`, `scripts/build_driver.py`, `scripts/update_api.sh`, and CI (through `setup.py`). The wheel build downloads `playwright-core` at this version from npm plus the matching Node.js binary and assembles the per-platform bundles — no source build. The version is baked into the staged bundle filenames (`driver/playwright-<version>-<suffix>.zip`), so it doubles as the build cache key.
22
22
-`NODE_VERSION` — the Node.js version bundled with the driver (one line, e.g. `24.16.0`). Maintained at roll time by `scripts/update_node_version.py` (latest LTS, mirroring upstream's `utils/build/update-playwright-node.mjs`).
23
23
-`scripts/build_driver.py` — assembles the per-platform driver bundles into `driver/` by downloading the `playwright-core` npm package (`DRIVER_VERSION`) and the official Node.js binaries (`NODE_VERSION`). Fetches `playwright-core` with `npm pack` (needs Node.js/npm on PATH; honours a root `.npmrc`) and the Node.js binaries over plain HTTP; invoked from `setup.py`'s `bdist_wheel` with the target platform's suffix (no arg builds all six).
24
-
- The API docs are **not** shipped in the bundle. `scripts/update_api.sh` reads them from a separate `microsoft/playwright` checkout (`$PW_SRC_DIR`) on the exact release branch for `DRIVER_VERSION`, never from a checkout on `main`or a feature branch. Needed only when regenerating the API, never at runtime.
24
+
- The API docs are **not** shipped in the bundle. `scripts/update_api.sh` reads them from a separate `microsoft/playwright` checkout (`$PW_SRC_DIR`) at the exact commit in `DRIVER_VERSION` (`rev=`), and refuses to run on any other commit or on local changes. Needed only when regenerating the API, never at runtime.
25
25
-`ROLLING.md`, `CONTRIBUTING.md` — human-facing setup and roll docs.
* change the driver pin in `DRIVER_VERSION` (the `playwright-core` npm version, e.g. `1.61.0`) and refresh `NODE_VERSION`: `python scripts/update_node_version.py`
14
+
* change the driver pin in `DRIVER_VERSION`: `npm=`the `playwright-core` npm version (e.g. `1.61.0`) and`rev=` the commit it is built from (`npm view playwright-core@<version> gitHead`); refresh `NODE_VERSION`: `python scripts/update_node_version.py`
15
15
* download the new driver: `python -m build --wheel` (fetches `playwright-core` via `npm pack` + the matching Node.js binary and assembles the bundle; no source build).
16
-
* generate API from the docs. This needs a separate `microsoft/playwright` checkout used only for rolls, on the exact release branch for the new version (e.g. `release-1.64`), clean and up to date with `origin`: `PW_SRC_DIR=../playwright-for-python ./scripts/update_api.sh`
16
+
* generate API from the docs. This needs a separate `microsoft/playwright` checkout used only for rolls, at the `rev=` commit of `DRIVER_VERSION` and clean (`git -C ../playwright-for-python fetch origin && git -C ../playwright-for-python checkout --detach <rev>`): `PW_SRC_DIR=../playwright-for-python ./scripts/update_api.sh`
17
17
* run `mypy playwright`: every error in `_generated.py` points at an implementation method in `playwright/_impl/` that lacks a new member or option. Implement it there, or record the difference in `scripts/codegen/python_rules.js`.
0 commit comments