Files
Jake WriterandClaude Opus 5.5 6c3850f60a Remove dead and duplicated code across the launchers, scripts and CI
Values both launchers hard-coded (marker fonts, the Windows 11 fonts, the
Apple Silicon and Intel Mac core and panel tables, plausible DPR and core
counts, the macOS MacinTalk/Eloquence voices, the cache prefs) now live in
python/src/camoufox/launcher-constants.json, which the TypeScript package
ships as a data file. gen-fonts-json.py and verify-fonts.py read the same
file, so the drifted PingFang marker copy is gone (fonts.json regenerates
byte-identical) and verify-fonts no longer ast-parses fingerprints.py.

- Drop the duplicate fpgen model pin under browser/scripts/data; the TS
  test checks the fpgen package's MODEL_PIN against the Python copy.
- Move pin-fpgen-model.py and clean-fingerprint-data.py to python/scripts.
- Delete the font licence report (font-metrics/licences.py and its saved
  output, open-fonts.txt): the bundle ships as built, so the report checks
  nothing.
- Delete unreferenced files: cleanfonts.sh, python/examples,
  typescript/renovate.json.
- Delete dead code: classify_installs, remove_mmdb, write_upstream_sh,
  bump_release, unused test constants and fixture helpers, the
  _virtual_display attribute writes, package.py's pre-groups font copy (a
  missing groups.json now fails).
- Share require_bundle, zip_entries, gh_headers and parse_shard instead of
  keeping copies; fold GitHubDownloader into CamoufoxFetcher in both
  launchers.
- TS raises ValueError where Python does, and `camoufox version` prints the
  fpgen package version as Python does.
- Python tests get src/ from pytest's pythonpath instead of sys.path
  inserts; skips that hid untested paths now assert or test the behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 13:38:55 -06:00

62 lines
1.6 KiB
TOML

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "camoufox"
version = "0.5.7"
description = "Wrapper around Playwright to help launch Camoufox"
authors = ["daijro <daijro.dev@gmail.com>"]
license = "MIT"
repository = "https://github.com/daijro/camoufox"
homepage = "https://camoufox.com/python"
readme = "README.md"
keywords = [
"client",
"fingerprint",
"browser",
"scraping",
"injector",
"firefox",
"playwright",
]
classifiers = [
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Browsers",
"Topic :: Software Development :: Libraries :: Python Modules",
]
[tool.poetry.dependencies]
python = "^3.10"
rich-click = "*"
rich = "*"
requests = "*"
orjson = "*"
fpgen = "^1.3.0"
# Keep a ceiling. 1.61 added Juggler params the protocol schema had to learn
# (viewport isMobile/screenSize, webp screenshots, webSocketFrame timestamps)
# and every Playwright minor is free to change Juggler again, while
# camoufox.server imports playwright._impl._driver -- a private API with no
# compat guarantee. Bump deliberately, with a run of `make -C browser tests`.
playwright = "<1.63"
pyyaml = "*"
platformdirs = "*"
numpy = "*"
ua_parser = "*"
typing_extensions = "*"
screeninfo = "*"
language-tags = "*"
pysocks = "*"
inquirer = "*"
maxminddb = {version = "*", optional = true}
[tool.poetry.extras]
geoip = ["maxminddb"]
[tool.poetry.scripts]
camoufox = "camoufox.__main__:cli"
[tool.pytest.ini_options]
# Test the in-tree package, whatever camoufox is installed.
pythonpath = ["src"]