Skip to content

refactor!: Rename PlaywrightCrawler kwargs: browser_options, page_options#831

Merged
vdusek merged 6 commits intomasterfrom
PwCraler-args
Dec 20, 2024
Merged

refactor!: Rename PlaywrightCrawler kwargs: browser_options, page_options#831
vdusek merged 6 commits intomasterfrom
PwCraler-args

Conversation

@Pijukatel
Copy link
Copy Markdown
Collaborator

@Pijukatel Pijukatel commented Dec 19, 2024

Description

Motivation is for the names to match their actual usage. Rename them also in internal components.
Change PlaywrightBrowserController.close method to rely on context to close pages, as per PW documentation recommendations.

Breaking changes

  • Renamed PlaywrightCrawler.__init__ keyword arguments: browser_options to browser_launch_options, page_options to browser_new_context_options.
  • Same keyword arguments renaming happened in PlaywrightBrowserPlugin, BaseBrowserPlugin, PlaywrightBrowserController, BaseBrowserController in all methods where previously named arguments were present.

Motivation is for the names to match their actual usage.
Rename them also in internal components.
Change PlaywrightBrowserController close method to rely on context to close pages, as per PW documentation recommendations.
@Pijukatel Pijukatel added t-tooling Issues with this label are in the ownership of the tooling team. adhoc Ad-hoc unplanned task added during the sprint. debt Code quality improvement or decrease of technical debt. labels Dec 19, 2024
@github-actions github-actions bot added this to the 105th sprint - Tooling team milestone Dec 19, 2024
@github-actions github-actions bot added the tested Temporary label used only programatically for some analytics. label Dec 19, 2024
@Pijukatel Pijukatel requested a review from vdusek December 19, 2024 08:43
@Pijukatel Pijukatel marked this pull request as ready for review December 19, 2024 08:43
@Pijukatel Pijukatel requested a review from janbuchar December 19, 2024 10:13
Copy link
Copy Markdown
Collaborator

@vdusek vdusek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still the old names in PlaywrightBrowserController._create_browser_context.

Pijukatel and others added 2 commits December 19, 2024 13:11
Update more docstrings.
Enable use of browser_new_context_options['proxy'].
@Pijukatel Pijukatel requested a review from vdusek December 19, 2024 14:46
Copy link
Copy Markdown
Collaborator

@vdusek vdusek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please write down the breaking changes - to the upgrading guide and copy them to the PR description as well, thanks.

@Pijukatel Pijukatel requested a review from vdusek December 20, 2024 06:57
@vdusek vdusek merged commit ffc6048 into master Dec 20, 2024
@vdusek vdusek deleted the PwCraler-args branch December 20, 2024 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. debt Code quality improvement or decrease of technical debt. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants