blinker is required, signals are always available

This commit is contained in:
David Lord 2023-04-13 07:34:14 -07:00
parent e1e4e82096
commit 9cb1a7a52d
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
18 changed files with 77 additions and 163 deletions

View file

@ -333,14 +333,9 @@ Useful Internals
Signals
-------
.. versionadded:: 0.6
Signals are provided by the `Blinker`_ library. See :doc:`signals` for an introduction.
.. data:: signals.signals_available
``True`` if the signaling system is available. This is the case
when `blinker`_ is installed.
The following signals exist in Flask:
.. _blinker: https://blinker.readthedocs.io/
.. data:: template_rendered
@ -507,7 +502,6 @@ The following signals exist in Flask:
.. versionadded:: 0.10
.. data:: message_flashed
This signal is sent when the application is flashing a message. The
@ -525,22 +519,10 @@ The following signals exist in Flask:
.. versionadded:: 0.10
.. class:: signals.Namespace
.. data:: signals.signals_available
An alias for :class:`blinker.base.Namespace` if blinker is available,
otherwise a dummy class that creates fake signals. This class is
available for Flask extensions that want to provide the same fallback
system as Flask itself.
.. method:: signal(name, doc=None)
Creates a new signal for this namespace if blinker is available,
otherwise returns a fake signal that has a send method that will
do nothing but will fail with a :exc:`RuntimeError` for all other
operations, including connecting.
.. _blinker: https://pypi.org/project/blinker/
.. deprecated:: 2.3
Will be removed in Flask 2.4. Signals are always available
Class-Based Views