-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Version
1.57.0
Steps to reproduce
Here's a full example that reproduces the issue.
It spins up a browser on remote-debugging-port 9222.
Then it creates a new session from the existing session.
import asyncio
from playwright.async_api import async_playwright
async def main():
async with async_playwright() as p0:
kwargs = {"headless": False, "args": ["--remote-debugging-port=9222"]}
browser = await p0.chromium.launch(**kwargs)
await browser.new_browser_cdp_session()
async with async_playwright() as p:
endpoint_url = "http://127.0.0.1:9222"
browser = await p.chromium.connect_over_cdp(endpoint_url)
context = await browser.new_context()
page = await context.new_page()
await context.close()
await browser.close()
if __name__ == "__main__":
loop = asyncio.new_event_loop()
loop.run_until_complete(main())This leads to:
(node:88758) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications.
Use the WHATWG URL API instead.
CVEs are not issued for `url.parse()` vulnerabilities.
(Use `node --trace-deprecation ...` to show where the warning was created)
That warning happens when reaching this line:
browser = await p.chromium.connect_over_cdp(endpoint_url)
Expected behavior
I expect no DeprecationWarning for url.parse() when running this code.
This same code worked correctly on previous versions of playwright.
Actual behavior
A DeprecationWarning for url.parse() appeared:
(node:88758) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications.
Use the WHATWG URL API instead.
CVEs are not issued for `url.parse()` vulnerabilities.
(Use `node --trace-deprecation ...` to show where the warning was created)
Additional context
No response
Environment
- Operating System: macOS M2 MacBook Air
- CPU: ARM64
- Browser: Chromium
- Python Version: 3.14
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels