New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] chromium_sandbox
doesn't default to False
#2273
Comments
I am digging into this issue some more to try and figure out if there is a difference between It appears that The more I look, I see @jamesbraza your report appears to just be the tip of the iceberg. |
All parameters of any Playwright API have
We can maybe get rid of all the |
Using |
I am also okay with defaulting to
So it's changing from:
To:
|
Great, I agree! Regarding the other issue at hand, observe the class Browser(ChannelOwner):
...
async def new_context(
self,
viewport: ViewportSize = None,
screen: ViewportSize = None,
noViewport: bool = None,
ignoreHTTPSErrors: bool = None,
javaScriptEnabled: bool = None,
bypassCSP: bool = None,
userAgent: str = None,
locale: str = None,
timezoneId: str = None,
geolocation: Geolocation = None,
permissions: Sequence[str] = None,
extraHTTPHeaders: Dict[str, str] = None,
offline: bool = None,
httpCredentials: HttpCredentials = None,
deviceScaleFactor: float = None,
isMobile: bool = None,
hasTouch: bool = None,
colorScheme: ColorScheme = None,
reducedMotion: ReducedMotion = None,
forcedColors: ForcedColors = None,
acceptDownloads: bool = None,
defaultBrowserType: str = None,
proxy: ProxySettings = None,
recordHarPath: Union[Path, str] = None,
recordHarOmitContent: bool = None,
recordVideoDir: Union[Path, str] = None,
recordVideoSize: ViewportSize = None,
storageState: Union[StorageState, str, Path] = None,
baseURL: str = None,
strictSelectors: bool = None,
serviceWorkers: ServiceWorkersPolicy = None,
recordHarUrlFilter: Union[Pattern[str], str] = None,
recordHarMode: HarMode = None,
recordHarContent: HarContentPolicy = None,
) -> BrowserContext:
... The type-hints for the An update that is compliant with Python 3.9- may look like this: class Browser(ChannelOwner):
...
async def new_context(
self,
viewport: Optional[ViewportSize] = None,
screen: Optional[ViewportSize] = None,
noViewport: Optional[bool] = None,
ignoreHTTPSErrors: Optional[bool] = None,
javaScriptEnabled: Optional[bool] = None,
bypassCSP: Optional[bool] = None,
userAgent: Optional[str] = None,
locale: Optional[str] = None,
timezoneId: Optional[str] = None,
geolocation: Optional[Geolocation] = None,
permissions: Optional[Sequence[str]] = None,
extraHTTPHeaders: Optional[Dict[str, str]] = None,
offline: Optional[bool] = None,
httpCredentials: Optional[HttpCredentials] = None,
deviceScaleFactor: Optional[float] = None,
isMobile: Optional[bool] = None,
hasTouch: Optional[bool] = None,
colorScheme: Optional[ColorScheme] = None,
reducedMotion: Optional[ReducedMotion] = None,
forcedColors: Optional[ForcedColors] = None,
acceptDownloads: Optional[bool] = None,
defaultBrowserType: Optional[str] = None,
proxy: Optional[ProxySettings] = None,
recordHarPath: Union[Path, str, None] = None,
recordHarOmitContent: Optional[bool] = None,
recordVideoDir: Union[Path, str, None] = None,
recordVideoSize: Optional[ViewportSize] = None,
storageState: Union[StorageState, str, Path, None] = None,
baseURL: Optional[str] = None,
strictSelectors: Optional[bool] = None,
serviceWorkers: Optional[ServiceWorkersPolicy] = None,
recordHarUrlFilter: Union[Pattern[str], str, None] = None,
recordHarMode: Optional[HarMode] = None,
recordHarContent: Optional[HarContentPolicy] = None,
) -> BrowserContext:
... |
System info
Source code
https://github.com/microsoft/playwright-python/blob/v1.41.1/playwright/async_api/_generated.py#L14804-L14805
The
chromium_sandbox
docstring says it defaults tofalse
, but it actually defaults toNone
. Also, it doesn't specify ifNone
is equivalent to false.Can we update the docstring description for
chromium_sandbox
?None
means in this contextNone
?Imo it would be more intuitive if the default were
False
, notNone
The text was updated successfully, but these errors were encountered: