From 43132608c621510a9c2e74e2eea2785b0280966b Mon Sep 17 00:00:00 2001 From: David Lord Date: Sun, 28 Apr 2024 13:00:40 -0700 Subject: [PATCH] fix deprecated receiver_connected import --- CHANGES.rst | 1 + src/blinker/base.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index ab6201f..9f1d88f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,7 @@ Unreleased - Restore identity handling for ``str`` and ``int`` senders. :pr:`148` - Fix deprecated ``blinker.base.WeakNamespace`` import. :pr:`149` +- Fix deprecated ``blinker.base.receiver_connected import``. :pr:`153` - Use types from ``collections.abc`` instead of ``typing``. :pr:`150` - Fully specify exported types as reported by pyright. :pr:`152` diff --git a/src/blinker/base.py b/src/blinker/base.py index 1b802b6..62086aa 100644 --- a/src/blinker/base.py +++ b/src/blinker/base.py @@ -604,11 +604,11 @@ def signal(self, name: str, doc: str | None = None) -> NamedSignal: def __getattr__(name: str) -> t.Any: - if name == "reciever_connected": + if name == "receiver_connected": warnings.warn( - "The global 'reciever_connected' signal is deprecated and will be" + "The global 'receiver_connected' signal is deprecated and will be" " removed in Blinker 1.9. Use 'Signal.receiver_connected' and" - " 'Signal.reciever_disconnected' instead.", + " 'Signal.receiver_disconnected' instead.", DeprecationWarning, stacklevel=2, )