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

Update channels to 4.2.0 #1039

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pyup-bot
Copy link
Collaborator

This PR updates channels from 3.0.5 to 4.2.0.

Changelog

4.2.0

------------------

* Dropped support for end-of-life Python 3.7.

* Added support for Python 3.11 and 3.12.

* Upped the minimum version of redis-py to 4.6.

* Added CI testing against redis-py versions 4.6, 5, and the development branch.

* Added CI testing against Channels versions 3, 4, and the development branch.

4.1.0

<https://channels.readthedocs.io/en/latest/releases/4.1.0.html>`_ for full
details.

4.0.0

------------------

Channels 4 is the next major version of the Channels package. Together with the
matching Daphne v4 and channels-redis v4 releases, it updates dependencies,
fixes issues, and removes outdated code. It so provides the foundation for
Channels development going forward.

In most cases, you can update now by updating ``channels``, ``daphne``, and
``channels-redis`` as appropriate, with ``pip``, and by adding ``daphne`` at
the top of your ``INSTALLED_APPS`` setting.

First ``pip``::

 pip install -U 'channels[daphne]' channels-redis

Then in your Django settings file::

 INSTALLED_APPS = [
     "daphne",
     ...
 ]

Again, this is a major version change. Amongst other changes, large amounts of
the Django-wrapping code deprecated in Channels v3 has now been removed, in
favour of Django's own ASGI handling, and the ``runserver`` command has been
moved into the Daphne package.

Please ensure to review the `Version 4.0.0 release notes
<https://channels.readthedocs.io/en/latest/releases/4.0.0.html>`_ for full
details.

3.4.1

------------------

* Fixed RuntimeError when checking for stale connections.

3.4.0

------------------

* Dropped support for Python 3.6, which is now end-of-life, and added CI
testing for Python 3.10. (301).

* Added serialize and deserialize hooks to RedisPubSubChannelLayer (281).

* Fixed iscoroutine check for pubsub proxied methods (297).

* Fix workers support when using Redis PubSub layer (298)

3.3.1

------------------

Two bugfixes for the PubSub channel layer:

* Scoped the channel layer per-event loop, in case multiple loops are in play
(262).

* Ensured consistent hashing PubSub was maintained across processes, or process
restarts (274).

3.3.0

------------------

Two important new features:

* You can now connect using `Redis Sentinel
<https://redis.io/topics/sentinel>`. Thanks to qeternity.

* There's a new ``RedisPubSubChannelLayer`` that uses Redis Pub/Sub to
propagate messages, rather than managing channels and groups directly within
the layer. For many use-cases this should be simpler, more robust, and more
performant.

Note though, the new ``RedisPubSubChannelLayer`` layer does not provide all
the options of the existing layer, including ``expiry``, ``capacity``, and
others. Please assess whether it's appropriate for your needs, particularly
if you have an existing deployment.

The ``RedisPubSubChannelLayer`` is currently marked as *Beta*. Please report
any issues, and be prepared that there may be breaking changes whilst it
matures.

The ``RedisPubSubChannelLayer`` accepts ``on_disconnect`` and
``on_reconnect`` config options, providing callbacks to handle the relevant
connection events to the Redis instance.

Thanks to Ryan Henning acu192.

For both features see the README for more details.

3.2.0

------------------

* Adjusted dependency specifiers to allow updating to the latest versions of
``asgiref`` and Channels.

3.1.0

------------------

* Ensured per-channel queues are bounded in size to avoid a slow memory leak if
consumers stop reading.

Queues are bound to the channel layer's configured ``capacity``. You may
adjust this to a suitably high value if you were relying on the previously
unbounded behaviour.
Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant