0.47.1: pin invisible-core 58.56.0, the keyboards Windows installs with the language

The keyboard pref carries Windows' own form (LANGID:KLID joined by
semicolons), declared by the core; the server's fallback, when a caller
wrote its prefs without it, uses the same form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
feder-crandClaude Opus 5.5 committed 2026-11-08 17:27:42 +01:00
1 parent 42cbc45da2
commit 7d702fb188
4 files changed
+22 -10

No files matched your search

+11
View File
@@ -6,6 +6,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
## [Unreleased]
## [0.47.1] - 2026-11-08
### Changed
- invisible-core 58.56.0, which this version pins. A persona has the keyboards
Windows installs with its language and country, read from Windows'
locale.nls (English US besides Persian, Azerbaijani, Bashkir, Cherokee and
Sakha; Russian besides Belarusian, Tatar and Armenian; Hindi Traditional for
Hindi), and switches as a user does: left Alt + Shift to the next language,
Ctrl + Shift to the next keyboard of the same language. The keyboard pref
carries Windows' own form (LANGID:KLID joined by semicolons).
## [0.47.0] - 2026-11-08
### Changed
+2 -2
View File
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "invisible_playwright"
version = "0.47.0"
version = "0.47.1"
description = "Playwright wrapper for a patched Firefox with deterministic stealth profile."
readme = "README.md"
requires-python = ">=3.11"
@@ -69,7 +69,7 @@ dependencies = [
# metadata; nothing in src/ hardcodes a second copy (tests/test_core_pin.py
# fails if one appears). What stays invisible to install-time machinery is the
# --no-deps / lockfile residue, and _pin.py is the only layer that sees it.
"invisible_core==58.55.0",
"invisible_core==58.56.0",
# ⛔ playwright is NO LONGER a dependency: since the full fork, the Python
# client lives in src/invisible_playwright/_pw/ and its server in
# src/invisible_playwright/_juggler/ (no Node driver). Reintroducing it would not visibly
+7 -6
View File
@@ -47,6 +47,7 @@ from invisible_core.juggler.injected import (ContextDestroyed, EvaluationError,
InjectedScript, js_truthy)
from invisible_core.juggler.keyboard import MODIFIER_MASK
from invisible_core.juggler.keyboard import layouts_for as keyboard_layouts_for
from invisible_core.juggler.keyboard import profiles_pref
from invisible_core.juggler.lifecycle import Lifecycle
# ⛔ RE-EXPORTED ON PURPOSE, not merely imported. These leaf helpers moved out
@@ -217,9 +218,9 @@ SESSION_SEED_PREF = "invisible.server.session_seed"
#: a cap of its own would be a second answer to a question the caller answered,
#: and would show up as a drag that ignores a budget every click obeys.
MOTION_BUDGET_PREF = "invisible.server.motion_budget_ms"
#: The persona's keyboards (Windows KLIDs joined by commas, the language's
#: first), decided by the core from the session's language AND country
#: (`keyboard.layouts_for`). Server-only, like
#: The persona's keyboards, as Windows writes its input profiles (LANGID:KLID
#: joined by semicolons, the language's first), decided by the core from the
#: session's language AND country (`keyboard.profiles_for`). Server-only, like
#: the seed: taken out of the prefs before the profile is written.
from invisible_core.juggler.keyboard import KEYBOARD_LAYOUT_PREF # noqa: E402
@@ -4122,7 +4123,7 @@ class BrowserDispatcher(Dispatcher):
layout: str = "us") -> None:
self.conn = conn
#: The keyboards the persona types on, from the session's language
#: (`keyboard.layouts_for`, KLIDs joined by commas): one set per
#: (`keyboard.profiles_for`, LANGID:KLID joined by semicolons): one set per
#: session, whatever a context later says its language is.
self.layout = layout
#: ⛔ WHETHER `route()` CAN WORK AT ALL. Firefox asks a channel's
@@ -5022,8 +5023,8 @@ class BrowserTypeDispatcher(Dispatcher):
params.get("firefoxUserPrefs") or {})
# The keyboard the session decided, out of the prefs before the
# profile sees them; without it, the language alone decides.
keyboard_layout = prefs.pop(KEYBOARD_LAYOUT_PREF, None) or ",".join(
keyboard_layouts_for(prefs.get("intl.accept_languages") or ""))
keyboard_layout = prefs.pop(KEYBOARD_LAYOUT_PREF, None) or profiles_pref(
prefs.get("intl.accept_languages") or "")
write_user_js(profile, prefs)
# ⛔ THE CALLER'S TIMEOUT, not ours. `launch(timeout=)` is a
# documented option and this server ignored it, so a caller who
@@ -36,7 +36,7 @@ def test_the_session_hands_the_server_its_language_and_country_s_keyboard():
timezone="Europe/Zurich", extra_prefs=None, virtual_display=False,
cursor_engine="python", humanize=True, session_seed=4242)
# Swiss French is the second keyboard Windows installs with Swiss German.
assert prefs[KEYBOARD_LAYOUT_PREF] == "00000807,0000100C"
assert prefs[KEYBOARD_LAYOUT_PREF] == "0807:00000807;100c:0000100C"
def test_a_russian_session_has_english_as_its_second_keyboard():
@@ -48,7 +48,7 @@ def test_a_russian_session_has_english_as_its_second_keyboard():
prefs = build_prefs(profile=generate_profile(seed=4242), locale=SessionLocale(("ru-RU", "ru"), "RU"),
timezone="Europe/Moscow", extra_prefs=None, virtual_display=False,
cursor_engine="python", humanize=True, session_seed=4242)
assert prefs[KEYBOARD_LAYOUT_PREF] == "00000419,00000409"
assert prefs[KEYBOARD_LAYOUT_PREF] == "0419:00000419;0409:00000409"
def test_the_browser_hands_its_layout_to_every_page(monkeypatch):