Skip to content
Myr

Merge pull request #3208 from singingwolfboy/fakesignal-connect-via

Before adoption: this commit came in with the history the project adopted, so no landing records it.

FakeSignal should stub connect_via method

authored by David Lord · committed by GitHub · parents fe41c6c, fcf2eb4 · Browse files · 2 files+10 added−9 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+10 added−9 removed

  • other:+10 added−9 removed

2 files+10 added−9 removed

modified:flask/signals.py+8 added-9 removed
30 unmodified lines
31 def __init__(self, name, doc=None):32 self.name = name33 self.__doc__ = doc3435 def send(self, *args, **kwargs):36 pass3738 def _fail(self, *args, **kwargs):39 raise RuntimeError(37 "signalling support is unavailable "38 "because the blinker library is "39 "not installed."40 "Signalling support is unavailable because the blinker"41 " library is not installed."42 )4342 send = lambda *a, **kw: None43 connect = (44 disconnect45 ) = (46 has_receivers_for47 ) = receivers_for = temporarily_connected_to = connected_to = _fail44 connect = connect_via = connected_to = temporarily_connected_to = _fail45 disconnect = _fail46 has_receivers_for = receivers_for = _fail47 del _fail484950# The namespace for code signals. If you are not Flask code, do
16 unmodified lines
modified:CHANGES.rst+2 added
45 unmodified lines
46 pick an available port. :issue:`2926`47- The return value from :meth:`cli.load_dotenv` is more consistent48 with the documentation. It will return ``False`` if python-dotenv is49 not installed, or if the given path isn't a file. :issue:`2937`50- Signaling support has a stub for the ``connect_via`` method when51 the Blinker library is not installed. :pr:`3208`5253.. _#2935: https://github.com/pallets/flask/issues/293554.. _#2957: https://github.com/pallets/flask/issues/295755.. _#2994: https://github.com/pallets/flask/pull/2994
948 unmodified lines