Skip to content

Commit fc9053e

Browse files
committed
Preparing v4.2 release.
1 parent 8d90b07 commit fc9053e

File tree

4 files changed

+63
-1
lines changed

4 files changed

+63
-1
lines changed

CHANGELOG.txt

+13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
Full release notes, with more details and upgrade information, are available at:
22
https://channels.readthedocs.io/en/latest/releases
33

4+
4.2.0 (expected by EOY 2024)
5+
------------------
6+
7+
Channels 4.2 introduces a couple of major but backwards-compatible
8+
changes, including most notably enhanced async suppport and fixing
9+
a long-standing bug where tests would try and close db connections
10+
and erroneously fail.
11+
12+
There are a number of other small bugfixes. Please ensure to review the
13+
`Version 4.2.0 release notes
14+
<https://channels.readthedocs.io/en/latest/releases/4.2.0.html>`_ for full
15+
details.
16+
417
4.1.0 (2024-04-03)
518
------------------
619

channels/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "4.1.0"
1+
__version__ = "4.2.0"
22

33

44
DEFAULT_CHANNEL_LAYER = "default"

docs/releases/4.2.0.rst

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
4.2.0 Release Notes
2+
===================
3+
4+
Channels 4.2 introduces a couple of major but backwards-compatible
5+
changes, including most notably enhanced async suppport and fixing
6+
a long-standing bug where tests would try and close db connections
7+
and erroneously fail.
8+
9+
Enhanced Async Support
10+
----------------------
11+
12+
Support for asynchronous consumers has been greatly improved.
13+
The documentation has been updated to reflect the async ORM
14+
features added in Django 4.2. A new `channels.db.aclose_old_connections`
15+
function has been added to easily close old database connections
16+
in async consumers.
17+
18+
Warning: Channels now automatically closes connections in async
19+
consumers before a new connection, after recieving message (but
20+
before dispatching to consumer code), and after disconnecting.
21+
22+
This change has been made to more closely align with Django's
23+
request/response cycle, and to help users avoid attempting
24+
to use stale/broken connections.
25+
26+
Notably, Channels does NOT close connections before or after
27+
a consumer **sends** data. This is to avoid database churn and
28+
more closely align with user expectations. Instead, users are
29+
expected to call `aclose_old_connections` occasionally during
30+
long-lived async connections.
31+
32+
33+
Bugfixes & Small Changes
34+
------------------------
35+
36+
* Database connections are no longer closed inside tests, which
37+
prevents erroneous "Cannot operate on a closed database" errors
38+
when running tets.
39+
40+
Thanks to Jon Janzen.
41+
42+
* An old import override and an unused deprecation message were removed
43+
44+
Thanks to @sevdog (Devid) and Jon Janzen.
45+
46+
* WebsocketCommunicator now has informative `assert` error messages
47+
48+
Thanks to Karel Hovorka.

docs/releases/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Release Notes
44
.. toctree::
55
:maxdepth: 1
66

7+
4.2.0
78
4.1.0
89
4.0.0
910
3.0.5

0 commit comments

Comments
 (0)