Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion playwright/_impl/_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union

from greenlet import greenlet
from pyee import AsyncIOEventEmitter

try:
from pyee.asyncio import AsyncIOEventEmitter
except ImportError:
# pyee < 9.0.0
from pyee import AsyncIOEventEmitter

from playwright._impl._helper import ParsedMessagePayload, parse_error
from playwright._impl._transport import Transport
Expand Down
8 changes: 7 additions & 1 deletion playwright/_impl/_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@

import websockets
import websockets.exceptions
from pyee import AsyncIOEventEmitter

try:
from pyee.asyncio import AsyncIOEventEmitter
except ImportError:
# pyee < 9.0.0
from pyee import AsyncIOEventEmitter

from websockets.client import connect as websocket_connect

from playwright._impl._api_types import Error
Expand Down