webbrowser: implement Webbrowser / ChromiumWebbrowser#5386
Merged
Conversation
4 tasks
fa07ad1 to
8312d3b
Compare
bastimeyer
commented
Jun 21, 2023
8312d3b to
b7931c7
Compare
Member
Author
|
Rebased to current head of master, because this PR is the base branch for other PRs until it got merged into master. Also disabled that one flaky test on Windows because I'm already annoyed by it. |
c739035 to
8d1c786
Compare
as well as pytest-trio and trio-typing
Implement utility function for resolving executables, with default names and fallback paths
8d1c786 to
1da1dc9
Compare
The base class for launching a web browser and interacting with it. Uses trio for async I/O.
Extends the base Webbrowser class with known Chromium/Chrome executable names and fallback paths on Windows and macOS, as well as an extensive list of launch arguments for disabling unneeded features and behaviors when running and controlling it via the Chrome Devtools Protocol (CDP).
1da1dc9 to
13bfa16
Compare
Member
Author
|
Rebased to master, fixed order of commits (dependencies first), added missing trio dependency note to docs and added API stability comment to the |
Member
Author
|
Thinking about it, it would probably make sense adding MSEdge to the executables list and fallback path list on Windows, even with a higher priority, since it's installed by default and can't be removed on this OS. The old non-Chromium Edge is dead, right? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 2/4 of #5380
Opening this as a draft was well until I have the rest finished.
This
triodependency, as well aspytest-trioandtrio-typingtrio-typinglooks like it's going to get merged intotriosoonpytest-triois used for initializing the runloop in async tests, similar topytest-asyncio.Having implementations for both
asyncioandtrioseems to cause minor issues with trio's runloop in the tests, and on Windows it triggers a warning when asyncio was run prior to its own runloop. This is related tosignal.set_wakeup_fd(). This can be resolved in the future by re-implementing theutils.processoutputbased on trio instead of asyncio. The other asyncio stuff is purely concurrency related and not I/O related, so it's irrelevant which runloop we're using. The warning can be ignored for now.Webbrowserbase class with the basic launch implementationChromiumWebbrowserclassPATHenv var nonsense)Headless mode is currently not added, but this can be done with a simple class argument. I can't get a valid client-integrity token on Twitch with headless mode, regardless of what others are saying, so I don't see the point right now.