Skip to content

fix(python): isolate launch environments#681

Open
Cloudymap1e wants to merge 1 commit into
daijro:mainfrom
Cloudymap1e:fix/virtual-display-env-isolation
Open

fix(python): isolate launch environments#681
Cloudymap1e wants to merge 1 commit into
daijro:mainfrom
Cloudymap1e:fix/virtual-display-env-isolation

Conversation

@Cloudymap1e

Copy link
Copy Markdown

Related Issue

Closes #304

Description

launch_options() reused and mutated either os.environ or the caller-provided env mapping while configuring virtual-display settings. A virtual launch could therefore leave DISPLAY and Wayland overrides behind for later headed launches.

This change snapshots the selected environment before applying per-launch overrides, so each sync or async launch receives an isolated mapping and caller-owned state remains unchanged.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Other

Testing

  • python -m pytest pythonlib/tests/test_launch_environment.py -q: 2 passed
  • python -m pytest pythonlib/tests -q: 45 passed, 4 skipped
  • Independent static review: PASS, no blocking findings

Fingerprint Report

Not applicable: this is a Python launch-environment change and does not alter the browser binary or fingerprint patches.

Checklist

  • I have linked a related issue above
  • My changes are focused on a single logical change
  • I have added testing instructions which include the desired result
  • Service tests pass (for python library changes) -./service-tester/run_tests.sh --browser-version official/prerelease/146.0.1-alpha.25 (attach screenshot) temporarily out of service lol
  • Build test passes (for patch changes) - not applicable to this Python-only change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exception with Camoufox when headless requests are followed by headed ones

1 participant