gecko-web-runtime-client 1.2.0__tar.gz → 1.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gecko_web_runtime_client-1.2.0/gecko_web_runtime_client.egg-info → gecko_web_runtime_client-1.3.1}/PKG-INFO +33 -16
- gecko_web_runtime_client-1.2.0/PKG-INFO → gecko_web_runtime_client-1.3.1/README.md +505 -499
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/installer.py +7 -7
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/network/client.py +5 -5
- gecko_web_runtime_client-1.2.0/README.md → gecko_web_runtime_client-1.3.1/gecko_web_runtime_client.egg-info/PKG-INFO +516 -488
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/pyproject.toml +1 -1
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/__init__.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/__main__.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/_leases.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/api/__init__.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/api/context.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/api/page.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/api/pool.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/api/runtime.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/data_plane.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/diagnostics/__init__.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/diagnostics/gc_cc.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/diagnostics/logging.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/diagnostics/memory.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/diagnostics/metrics.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/diagnostics/resources.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/http.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/iocp_pipe.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/models/__init__.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/models/navigation.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/network/__init__.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/network/_urls.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/network/exceptions.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/network/models.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/network/transport.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/pipe.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/session.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/workflows/__init__.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/workflows/turnstile.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime/workflows/wechat.py +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime_client.egg-info/SOURCES.txt +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime_client.egg-info/dependency_links.txt +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime_client.egg-info/requires.txt +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/gecko_web_runtime_client.egg-info/top_level.txt +0 -0
- {gecko_web_runtime_client-1.2.0 → gecko_web_runtime_client-1.3.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gecko-web-runtime-client
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.1
|
|
4
4
|
Summary: Thin Python client for the Firefox-derived WPR Gecko Worker protocol
|
|
5
5
|
Author: WPR project
|
|
6
6
|
License: MPL-2.0-compatible client; see the runtime bundle notices
|
|
@@ -11,6 +11,17 @@ Requires-Dist: loguru>=0.7.2; extra == "diagnostics"
|
|
|
11
11
|
|
|
12
12
|
# Python client
|
|
13
13
|
|
|
14
|
+
Version `1.3.1` pins runtime `155.0.6` with the native autonomous-navigation
|
|
15
|
+
viewport repair. Upgrade the client, then run
|
|
16
|
+
`python -m gecko_web_runtime install-runtime --version 155` to replace an older
|
|
17
|
+
runtime in place. The Python workflow API and HTTP concurrency defaults are unchanged.
|
|
18
|
+
|
|
19
|
+
Version `1.3.0` defaults to one Worker, 20 Channels,
|
|
20
|
+
`ipc_backend="iocp"` and `release_mode="piggyback"`. Published version 1.2.0
|
|
21
|
+
still defaults to one Channel, threaded IPC and immediate release. Runtime
|
|
22
|
+
155.0.5 is required for the new defaults. Existing 1.2.0 installations keep
|
|
23
|
+
their behavior until explicitly upgraded.
|
|
24
|
+
|
|
14
25
|
The client provides a standard-library core plus an optional Loguru-backed
|
|
15
26
|
diagnostics layer. From this directory:
|
|
16
27
|
|
|
@@ -66,16 +77,17 @@ helpers), `network/transport.py` (the versioned Worker boundary),
|
|
|
66
77
|
|
|
67
78
|
`timeout` accepts seconds, `Timeout(total=seconds, pool=seconds)`, or `None`.
|
|
68
79
|
`total` covers queueing plus the active request; `pool` can bound waiting for
|
|
69
|
-
an available
|
|
70
|
-
|
|
71
|
-
|
|
80
|
+
an available request slot. The 1.3.0 default is one Worker with 20
|
|
81
|
+
concurrent Channels. `asyncio.gather()` submits the work; the client limits
|
|
82
|
+
active requests to `max_workers * max_channels_per_worker`. No arguments are
|
|
83
|
+
needed to discover the installed runtime and enable the default transport:
|
|
72
84
|
|
|
73
85
|
```python
|
|
74
86
|
import asyncio
|
|
75
87
|
from gecko_web_runtime import AsyncWprHttpClient
|
|
76
88
|
|
|
77
89
|
async def main():
|
|
78
|
-
async with AsyncWprHttpClient(
|
|
90
|
+
async with AsyncWprHttpClient() as client:
|
|
79
91
|
responses = await asyncio.gather(
|
|
80
92
|
*(client.get(f"https://example.com/api/{i}") for i in range(8))
|
|
81
93
|
)
|
|
@@ -87,8 +99,8 @@ async def main():
|
|
|
87
99
|
asyncio.run(main())
|
|
88
100
|
```
|
|
89
101
|
|
|
90
|
-
|
|
91
|
-
|
|
102
|
+
Channels bound in-flight requests, not HTTP sockets or Python threads. Set
|
|
103
|
+
`max_channels_per_worker` to change the single-Worker limit. Each extra
|
|
92
104
|
Worker is a separate Firefox process/profile and therefore has its own Gecko
|
|
93
105
|
CookieService state; multi-Worker cookie continuity is not shared or ordered.
|
|
94
106
|
Keep the default `max_workers=1` when requests depend on a single browser cookie
|
|
@@ -96,12 +108,14 @@ jar or when minimizing memory is more important than parallel throughput. The
|
|
|
96
108
|
pool grows lazily up to the configured cap and reuses Workers after requests.
|
|
97
109
|
For latency-sensitive bursts, call `await client.warmup(url)` immediately after
|
|
98
110
|
entering the client and before sending application requests. It starts the
|
|
99
|
-
remaining Workers and makes one full GET per
|
|
111
|
+
remaining Workers and makes one full GET per Channel slot to the supplied URL; the
|
|
100
112
|
responses are read and released while the Worker connections stay open. This
|
|
101
113
|
is real traffic, so use a safe, idempotent endpoint. Cookies set by that
|
|
102
|
-
endpoint remain isolated in each Worker profile.
|
|
103
|
-
|
|
104
|
-
|
|
114
|
+
endpoint remain isolated in each Worker profile. With the new defaults a
|
|
115
|
+
warmup call makes 20 real GETs; entering a client by itself makes none.
|
|
116
|
+
Active timeout/cancellation in the default multiplexed mode cancels only its
|
|
117
|
+
request Channel. Explicit legacy single-Channel mode stops the Worker and
|
|
118
|
+
the next request replaces it.
|
|
105
119
|
A queued request timeout leaves active requests and Workers untouched.
|
|
106
120
|
Connect/read/write phase timeouts still need native Worker support.
|
|
107
121
|
|
|
@@ -127,8 +141,9 @@ completes. Set `WPR_RUNTIME_HOME`, `WPR_RUNTIME_DIR`, and
|
|
|
127
141
|
|
|
128
142
|
Client 1.2.0 with runtime 155.0.5 supports `ipc_backend="iocp"` and
|
|
129
143
|
`max_channels_per_worker=10` with `max_workers=1`, keeping one shared
|
|
130
|
-
cookie/proxy session while issuing concurrent Necko requests.
|
|
131
|
-
|
|
144
|
+
cookie/proxy session while issuing concurrent Necko requests. Version 1.2.0
|
|
145
|
+
uses explicit opt-in; version 1.3.0 selects these features by default.
|
|
146
|
+
Older runtimes lack these capabilities;
|
|
132
147
|
upgrade both the client and runtime before enabling multi-Channel requests.
|
|
133
148
|
See [selection, protocol, and reproducible build instructions](../source/gecko-net-worker/experiments/multiplex-network/README.md).
|
|
134
149
|
|
|
@@ -151,7 +166,8 @@ exact instantaneous maxima, or a claim of equivalent physical RAM consumption.
|
|
|
151
166
|
See [results, limitations, and reproduction commands](tests/results/http-resource-comparison-20261011.md).
|
|
152
167
|
The test entry points are `tests/integration/baidu_live_ab.py` and
|
|
153
168
|
`tests/integration/baidu_resource_ab.py`. They remain development tests; the
|
|
154
|
-
|
|
169
|
+
measurements refer to the released 1.2.0 configuration, not a claim that
|
|
170
|
+
the 1.3.0 defaults have identical resource costs.
|
|
155
171
|
|
|
156
172
|
## Network IPC diagnostics and pipe A/B
|
|
157
173
|
|
|
@@ -222,7 +238,7 @@ $env:WPR_PIPE_MODE = 'persistent'
|
|
|
222
238
|
```
|
|
223
239
|
|
|
224
240
|
```python
|
|
225
|
-
async with AsyncWprHttpClient(
|
|
241
|
+
async with AsyncWprHttpClient() as client:
|
|
226
242
|
response = await client.get("http://127.0.0.1:8080/")
|
|
227
243
|
body = await response.aread()
|
|
228
244
|
await client.flush_releases() # Optional explicit Worker-side confirmation.
|
|
@@ -236,7 +252,8 @@ pipe occupancy can delay it. Thresholds of 32 entries or 8 MiB trigger drains;
|
|
|
236
252
|
they are not global caps on unread response memory. Only acknowledged entries
|
|
237
253
|
are removed from the pending queue. Abort stops the Worker and discards its queue.
|
|
238
254
|
|
|
239
|
-
The default
|
|
255
|
+
The 1.3.0 default is `release_mode="piggyback"`; pass `"immediate"`
|
|
256
|
+
explicitly to release each response through a separate RPC. Old Workers are rejected during
|
|
240
257
|
capability negotiation if piggyback mode is requested, before any HTTP request
|
|
241
258
|
is sent. `transport_stats` covers the currently resident pool, not retired Workers.
|
|
242
259
|
|