Skip to content

Commit

Permalink
Merge pull request #153 from pallets-eco/deprecated-import
Browse files Browse the repository at this point in the history
fix deprecated receiver_connected import
  • Loading branch information
davidism committed Apr 28, 2024
2 parents d15107c + 4313260 commit 793f8be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
6 changes: 3 additions & 3 deletions src/blinker/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down

0 comments on commit 793f8be

Please sign in to comment.