Skip to content

fix(python): share browser-string resolution across sync and async clients#481

Open
barjin wants to merge 1 commit into
masterfrom
fix/python-browser-string-drift
Open

fix(python): share browser-string resolution across sync and async clients#481
barjin wants to merge 1 commit into
masterfrom
fix/python-browser-string-drift

Conversation

@barjin

@barjin barjin commented Jun 12, 2026

Copy link
Copy Markdown
Member

The sync and async Python clients each hand-maintained their own browser string → fingerprint match, and the two had drifted. The async client mapped chrome124 to the chrome_125 fingerprint (mislabeled, even though a real chrome_124 fingerprint exists in the core database), while the sync client didn't recognize chrome124 at all and fell back to panic!("Unsupported browser"), aborting across the FFI boundary instead of raising a catchable Python exception.

This extracts the resolution into a single fingerprint_by_name helper that both clients call, so they can no longer diverge. chrome124 now resolves to its real chrome_124 fingerprint, the sync client gains chrome124 support, and unknown browser strings raise a ValueError in both clients. To surface that error the sync constructor return type changes from Result<Self, ImpitPyError> to PyResult<Self> (with the one no_client macro caller adjusted to match).

The bare chrome alias is intentionally left at chrome_125 in both clients to preserve current behavior and the pinned JA4 test.

Closes #476

…ients

The sync and async clients each hand-maintained their own browser-string to
fingerprint match, which had drifted: async mapped `chrome124` to the chrome_125
fingerprint (mislabeled) while sync lacked `chrome124` entirely and panicked
across the FFI boundary on any unknown browser instead of raising a catchable
exception. Extract a single `fingerprint_by_name` helper used by both clients so
they can no longer diverge, map `chrome124` to its real chrome_124 fingerprint,
and return a `ValueError` for unknown browsers.

Closes #476
@github-actions github-actions Bot added this to the 142nd sprint - Tooling team milestone Jun 12, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(py) Browser-string match drift: 'chrome124' maps to chrome_125 in async but panics in sync client

2 participants