Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New asyncio implementation #1332

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Move asyncio compatibility to a new package.
  • Loading branch information
aaugustin committed Feb 11, 2024
commit 07f73cfcad4e96d3c0d469dc109799457d665723
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ branch = true
omit = [
# */websockets matches src/websockets and .tox/**/site-packages/websockets
"*/websockets/__main__.py",
"*/websockets/legacy/async_timeout.py",
"*/websockets/legacy/compatibility.py",
"*/websockets/asyncio/async_timeout.py",
"*/websockets/asyncio/compatibility.py",
"tests/maxi_cov.py",
]

Expand Down
Empty file.
2 changes: 1 addition & 1 deletion src/websockets/legacy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
cast,
)

from ..asyncio.compatibility import asyncio_timeout
from ..datastructures import Headers, HeadersLike
from ..exceptions import (
InvalidHandshake,
Expand All @@ -44,7 +45,6 @@
from ..http import USER_AGENT
from ..typing import ExtensionHeader, LoggerLike, Origin, Subprotocol
from ..uri import WebSocketURI, parse_uri
from .compatibility import asyncio_timeout
from .handshake import build_request, check_response
from .http import read_response
from .protocol import WebSocketCommonProtocol
Expand Down
2 changes: 1 addition & 1 deletion src/websockets/legacy/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
cast,
)

from ..asyncio.compatibility import asyncio_timeout
from ..datastructures import Headers
from ..exceptions import (
ConnectionClosed,
Expand All @@ -54,7 +55,6 @@
)
from ..protocol import State
from ..typing import Data, LoggerLike, Subprotocol
from .compatibility import asyncio_timeout
from .framing import Frame


Expand Down
2 changes: 1 addition & 1 deletion src/websockets/legacy/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
cast,
)

from ..asyncio.compatibility import asyncio_timeout
from ..datastructures import Headers, HeadersLike, MultipleValuesError
from ..exceptions import (
AbortHandshake,
Expand All @@ -46,7 +47,6 @@
from ..http import USER_AGENT
from ..protocol import State
from ..typing import ExtensionHeader, LoggerLike, Origin, StatusLike, Subprotocol
from .compatibility import asyncio_timeout
from .handshake import build_response, check_request
from .http import read_request
from .protocol import WebSocketCommonProtocol
Expand Down
2 changes: 1 addition & 1 deletion tests/legacy/test_client_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import urllib.request
import warnings

from websockets.asyncio.compatibility import asyncio_timeout
from websockets.datastructures import Headers
from websockets.exceptions import (
ConnectionClosed,
Expand All @@ -30,7 +31,6 @@
from websockets.frames import CloseCode
from websockets.http import USER_AGENT
from websockets.legacy.client import *
from websockets.legacy.compatibility import asyncio_timeout
from websockets.legacy.handshake import build_response
from websockets.legacy.http import read_response
from websockets.legacy.server import *
Expand Down