Skip to content

Commit 8b61513

Browse files
committed
Releasing 3.5.0
(Includes scheduled removal of the old Websocket types)
1 parent b2e1c9d commit 8b61513

File tree

4 files changed

+14
-62
lines changed

4 files changed

+14
-62
lines changed

CHANGELOG.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
3.5.0 (2022-01-22)
2+
------------------
3+
4+
* Python 3.6 is no longer supported, and asyncio calls have been changed to
5+
use only the modern versions of the APIs as a result
6+
7+
* Several causes of RuntimeErrors in cases where an event loop was assigned
8+
to a thread but not running
9+
10+
* Speed improvements in the Local class
11+
12+
113
3.4.1 (2021-07-01)
214
------------------
315

asgiref/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.4.1"
1+
__version__ = "3.5.0"

asgiref/typing.py

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
import sys
2-
import warnings
3-
from typing import (
4-
Any,
5-
Awaitable,
6-
Callable,
7-
Dict,
8-
Iterable,
9-
List,
10-
Optional,
11-
Tuple,
12-
Type,
13-
Union,
14-
)
2+
from typing import Awaitable, Callable, Dict, Iterable, Optional, Tuple, Type, Union
153

164
if sys.version_info >= (3, 8):
175
from typing import Literal, Protocol, TypedDict
@@ -252,31 +240,3 @@ async def __call__(
252240
Awaitable[None],
253241
]
254242
ASGIApplication = Union[ASGI2Application, ASGI3Application]
255-
256-
__deprecated__ = {
257-
"WebsocketConnectEvent": WebSocketConnectEvent,
258-
"WebsocketAcceptEvent": WebSocketAcceptEvent,
259-
"WebsocketReceiveEvent": WebSocketReceiveEvent,
260-
"WebsocketSendEvent": WebSocketSendEvent,
261-
"WebsocketResponseStartEvent": WebSocketResponseStartEvent,
262-
"WebsocketResponseBodyEvent": WebSocketResponseBodyEvent,
263-
"WebsocketDisconnectEvent": WebSocketDisconnectEvent,
264-
"WebsocketCloseEvent": WebSocketCloseEvent,
265-
}
266-
267-
268-
def __getattr__(name: str) -> Any:
269-
deprecated = __deprecated__.get(name)
270-
if deprecated:
271-
stacklevel = 3 if sys.version_info >= (3, 7) else 4
272-
warnings.warn(
273-
f"'{name}' is deprecated. Use '{deprecated.__name__}' instead.",
274-
category=DeprecationWarning,
275-
stacklevel=stacklevel,
276-
)
277-
return deprecated
278-
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
279-
280-
281-
def __dir__() -> List[str]:
282-
return sorted(list(__all__) + list(__deprecated__.keys()))

tests/test_deprecated_types.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)