mirror of
https://github.com/daijro/camoufox.git
synced 2026-11-19 00:07:28 +00:00
None of these had a caller: - pkgman: is_supported_path, extract_zip, cleanup and set_version, left over from the single-directory install. cleanup() would have deleted every installed browser version. - multiversion.get_cached_repo_names, CONSTRAINTS.as_range, fingerprints._load_os_voices, utils._clean_locals, and unused imports. Also: - The "Apify Fingerprints" row in `camoufox version`, which has read "?" since fpgen replaced BrowserForge. - lxml is no longer a dependency; nothing imports it. - The geoip extra now names maxminddb, the module geolocation.py actually imports, rather than getting it transitively through geoip2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
1.3 KiB
Python
32 lines
1.3 KiB
Python
"""
|
|
Camoufox version constants.
|
|
"""
|
|
|
|
|
|
class CONSTRAINTS:
|
|
"""
|
|
The minimum and maximum supported versions of the Camoufox browser.
|
|
"""
|
|
|
|
MIN_VERSION = 'alpha.1'
|
|
MAX_VERSION = '1'
|
|
|
|
# The browser floor is conditional on the resolved Playwright, not fixed.
|
|
#
|
|
# Each entry is (playwright_version, required_browser_build): from that
|
|
# Playwright on, the browser must be at least that build. 1.61 began
|
|
# sending viewport isMobile/screenSize in Browser.setDefaultViewport and
|
|
# Page.setViewportSize; beta.30 is the first build whose Protocol.js schema
|
|
# accepts them. Below that pairing every new_context() dies with
|
|
# "Protocol error (Browser.setDefaultViewport)". Measured: 1.60 works on
|
|
# beta.29 and beta.30; 1.61 and 1.62 fail on beta.29 and pass on beta.30.
|
|
#
|
|
# A flat MIN_VERSION cannot express this. It only knows about the browser,
|
|
# so to stay safe it has to assume the worst Playwright and force *every*
|
|
# user to re-download -- including the majority on <1.61, who are in no
|
|
# danger -- and it leaves the library unusable until the matching browser
|
|
# release is published. Keyed on Playwright, only the users who would
|
|
# actually break get moved.
|
|
PLAYWRIGHT_BROWSER_FLOORS = (((1, 61), 'beta.30'),)
|
|
|