Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FakeSignal should stub connect_via method#3208

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletionsCHANGES.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,6 +47,8 @@ Unreleased
- The return value from :meth:`cli.load_dotenv` is more consistent
with the documentation. It will return ``False`` if python-dotenv is
not installed, or if the given path isn't a file. :issue:`2937`
- Signaling support has a stub for the ``connect_via`` method when
the Blinker library is not installed. :pr:`3208`

.. _#2935: https://github.com/pallets/flask/issues/2935
.. _#2957: https://github.com/pallets/flask/issues/2957
Expand Down
17 changes: 8 additions & 9 deletionsflask/signals.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,19 +32,18 @@ def __init__(self, name, doc=None):
self.name = name
self.__doc__ = doc

def send(self, *args, **kwargs):
pass

def _fail(self, *args, **kwargs):
raise RuntimeError(
"signalling support is unavailable "
"because the blinker library is "
"not installed."
"Signalling support is unavailable because the blinker"
" library is not installed."
)

send = lambda *a, **kw: None
connect = (
disconnect
) = (
has_receivers_for
) = receivers_for = temporarily_connected_to = connected_to = _fail
connect = connect_via = connected_to = temporarily_connected_to = _fail
disconnect = _fail
has_receivers_for = receivers_for = _fail
del _fail


Expand Down

[8]ページ先頭

©2009-2026 Movatter.jp