Skip to content

Update daphne to 4.0.0 #1041

New issue

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

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

Already on GitHub? # to your account

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

Conversation

pyup-bot
Copy link
Collaborator

@pyup-bot pyup-bot commented Oct 7, 2022

This PR updates daphne from 2.3.0 to 4.0.0.

Changelog

4.0.0b1

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

This is a beta release to allow testing compatibility with the upcoming Channels
4.0.

* Dropped support for Python 3.6.

* Updated dependencies to the latest versions.

Previously a range of Twisted versions have been supported. Recent Twisted
releases (22.2, 22.4) have issued security fixes, so those are now the
minimum supported version. Given the stability of Twisted, supporting a
range of versions does not represent a good use of maintainer time. Going
forward the latest Twisted version will be required.

* Set ``daphne`` as default ``Server`` header.

This can be configured with the ``--server-name`` CLI argument.

Added the new ``--no-server-name`` CLI argument to disable the ``Server``
header, which is equivalent to ``--server-name=` (an empty name).

* Added ``--log-fmt`` CLI argument.

* Added support for ``ASGI_THREADS`` environment variable, setting the maximum
number of workers used by a ``SyncToAsync`` thread-pool executor.

Set e.g. ``ASGI_THREADS=4 daphne ...`` when running to limit the number of
workers.

* Added a ``runserver`` command to run an ASGI Django development server.

Added ``"daphne"`` to the ``INSTALLED_APPS`` setting, before
``"django.contrib.staticfiles"`` to enable:

INSTALLED_APPS = [
 "daphne",
 ...
]

3.0.2

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

* Fixed a bug where ``send`` passed to applications wasn't a true async
function but a lambda wrapper, preventing it from being used with
``asgiref.sync.async_to_sync()``.

3.0.1

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

* Fixed a bug where ``asyncio.CancelledError`` was not correctly handled on
Python 3.8+, resulting in incorrect protocol application cleanup.

3.0.0

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

* Updates internals to use ASGI v3 throughout. ``asgiref.compatibility`` is
used for older applications.

* Consequently, the `--asgi-protocol` command-line option is removed.

* HTTP request bodies are now read, and passed to the application, in chunks.

* Added support for Python 3.9.

* Dropped support for Python 3.5.

2.5.0

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

* Fixes compatability for twisted when running Python 3.8+ on Windows, by
setting ``asyncio.WindowsSelectorEventLoopPolicy`` as the event loop policy
in this case.

* The internal ``daphne.testing.TestApplication`` now requires an addition
``lock`` argument to ``__init__()``. This is expected to be an instance of
``multiprocessing.Lock``.

2.4.1

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

* Avoids Twisted using the default event loop, for compatibility with Django
3.0's ``async_unsafe()`` decorator in threaded contexts, such as using the
auto-reloader.

2.4.0

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

* Adds CI testing against and support for Python 3.8.

* Adds support for ``raw_path`` in ASGI scope.

* Ensures an error response is sent to the client if the application sends
malformed headers.

* Resolves an asyncio + multiprocessing problem when testing that would cause
the test suite to fail/hang on macOS.

* Requires installing Twisted's TLS extras, via ``install_requires``.

* Adds missing LICENSE to distribution.
Links

@pyup-bot pyup-bot mentioned this pull request Oct 7, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant