GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: roll to Playwright 1.16.0-next-1633339886000 (#932) · Coder-Soder/playwright-python@287d820

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • README.md
  • playwright/_impl
    • _browser_context.py
    • _helper.py
    • _page.py
  • setup.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Playwright is a Python library to automate [Chromium](https://www.chromium.org/H
44

55
| | Linux | macOS | Windows |
66
| :--- | :---: | :---: | :---: |
7-
| Chromium <!-- GEN:chromium-version -->96.0.4655.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
7+
| Chromium <!-- GEN:chromium-version -->96.0.4659.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
88
| WebKit <!-- GEN:webkit-version -->15.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
99
| Firefox <!-- GEN:firefox-version -->92.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
1010

Collapse file

‎playwright/_impl/_browser_context.py‎

Copy file name to clipboardExpand all lines: playwright/_impl/_browser_context.py
+9-2Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,20 @@ def _on_page(self, page: Page) -> None:
149149
page._opener.emit(Page.Events.Popup, page)
150150

151151
def _on_route(self, route: Route, request: Request) -> None:
152+
handled = False
152153
for handler_entry in self._routes:
153154
if handler_entry.matches(request.url):
154155
result = handler_entry.handle(route, request)
155156
if inspect.iscoroutine(result):
156157
asyncio.create_task(result)
157-
return
158-
asyncio.create_task(route.continue_())
158+
handled = True
159+
break
160+
if not handled:
161+
asyncio.create_task(route.continue_())
162+
else:
163+
self._routes = list(
164+
filter(lambda route: route.expired() is False, self._routes)
165+
)
159166

160167
def _on_binding(self, binding_call: BindingCall) -> None:
161168
func = self._bindings.get(binding_call._initializer["name"])
Collapse file

‎playwright/_impl/_helper.py‎

Copy file name to clipboardExpand all lines: playwright/_impl/_helper.py
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,15 @@ def __init__(
213213
self._times = times
214214
self._handled_count = 0
215215

216+
def expired(self) -> bool:
217+
return self._times is not None and self._handled_count >= self._times
218+
216219
def matches(self, request_url: str) -> bool:
217-
if self._times and self._handled_count >= self._times:
218-
return False
219220
return self.matcher.matches(request_url)
220221

221222
def handle(self, route: "Route", request: "Request") -> Union[Coroutine, Any]:
222-
self._handled_count += 1
223+
if self._times:
224+
self._handled_count += 1
223225
return cast(
224226
Callable[["Route", "Request"], Union[Coroutine, Any]], self.handler
225227
)(route, request)
Collapse file

‎playwright/_impl/_page.py‎

Copy file name to clipboardExpand all lines: playwright/_impl/_page.py
+9-2Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,20 @@ def _on_frame_detached(self, frame: Frame) -> None:
212212
self.emit(Page.Events.FrameDetached, frame)
213213

214214
def _on_route(self, route: Route, request: Request) -> None:
215+
handled = False
215216
for handler_entry in self._routes:
216217
if handler_entry.matches(request.url):
217218
result = handler_entry.handle(route, request)
218219
if inspect.iscoroutine(result):
219220
asyncio.create_task(result)
220-
return
221-
self._browser_context._on_route(route, request)
221+
handled = True
222+
break
223+
if not handled:
224+
self._browser_context._on_route(route, request)
225+
else:
226+
self._routes = list(
227+
filter(lambda route: route.expired() is False, self._routes)
228+
)
222229

223230
def _on_binding(self, binding_call: "BindingCall") -> None:
224231
func = self._bindings.get(binding_call._initializer["name"])
Collapse file

‎setup.py‎

Copy file name to clipboardExpand all lines: setup.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
InWheel = None
2929
from wheel.bdist_wheel import bdist_wheel as BDistWheelCommand
3030

31-
driver_version = "1.16.0-next-1632960932000"
31+
driver_version = "1.16.0-next-1633339886000"
3232

3333

3434
def extractall(zip: zipfile.ZipFile, path: str) -> None:

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.