webbrowser.cdp: implement CDP connection #5388
Merged
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 3/4 of #5380
This currently includes the commits of #5381 (part 1) and #5386 (part 2), because this code is needed for the CDP connection stuff. Once those PRs have been merged into master, I will rebase this branch.
So the only relevant commits of this PR are the ones after the merge commit. See the check marks of the HEAD commits of those other branches.
This
trio-websocket
andtyping-extensions
runtime dependencies.typing-extensions
is required, because I neededTypeAlias
for making theCDPEventListener
's typing work. This conveniently also addsSelf
and other things.trio-chrome-devtools-protocol
project, which uses the MIT license. This is properly annotated with the included license text. I applied several improvements and fixes to the code. This is all fully tested with full coverage.from __future__ import annotations
workaround so the memory channels can have proper typing information, which is important. This will be resolved in their next release (they are waiting for the EOL of py37), but I don't think it's worth removing the import and bumping the version requirement once it's released.