summaryrefslogtreecommitdiff
path: root/tests/test_signals.py
Commit message (Collapse)AuthorAgeFilesLines
* Add an initial set of type hintspgjones2023-04-021-1/+0
| | | | | | | These focus on the public API with the private aspect omitted. This is because these are hard to type, and may not be required with modern python. However, this should still be useful if adopted for code that uses blinker.
* Add a send_async method to the Signalpgjones2023-01-241-0/+27
| | | | | | | | | | This allows for signals to send to coroutine receivers by awaiting them. The _async_wrapper and _sync_wrapper allows for conversion of sync and async receivers as required if defined. If not defined a runtime error is raised. The wrappers are used to avoid any direct tie into asyncio, trio, greenbacks, asgiref, or other specific async implementation.
* Allow int senderspgjones2023-01-241-0/+15
| | | | | This allows int values as senders much in the same way string values are allowed.
* Added `muted` context manager for temproary switching signal off (#84)Phil Jones2023-01-241-0/+17
| | | | | This is useful whilst testing to remove a signal's affects. Co-authored-by: Michael Elovskikh <wronglink@yandex-team.ru>
* Fix issues reported by flake8Bartek Sokorski2023-01-221-11/+15
|
* Apply styling changes to testsBartek Sokorski2023-01-221-73/+98
|
* Revert "Merge pull request #18 from jek/feature/send-async"David Lord2022-07-171-5/+0
| | | | | This reverts commit b5e9f0629200d2b2f62e13e595b802948bb4fefb, reversing changes made to 904d8d3803e84257c08526e9047474215aa1c976.
* Merge pull request #60 from pgajdos/masterDavid Lord2022-07-171-2/+2
|\ | | | | use pytest instead of deprecated nose
| * use pytest instead of deprecated nosepgajdos2020-07-081-2/+2
| |
* | Merge branch 'master' into feature/send-asyncYouri Ackx2020-10-021-14/+7
|\ \ | |/ | | | | | | # Conflicts: # CHANGES
| * Unnecessary dict call - rewrite as a literalhugovk2018-03-211-7/+7
| |
| * Drop support for EOL Pythonhugovk2018-03-201-7/+0
| |
* | Adds Signal.send_async for asynciojason kirtland2015-07-241-0/+5
|/
* Added Signal._cleanup_bookeeping() to prune stale bookkeeping on demand.jason kirtland2015-07-231-0/+4
|
* Additional bookkeeping cleanup for non-ANY connections at disconnect time.jason kirtland2015-07-231-0/+32
|
* blinker.signal() and blinker.Namespace no longer use weak references.jason kirtland2013-07-031-2/+17
| | | | | | | | | | | | In the original implementation, I was uneasy about releasing a library that held an unbounded, module-level cache, so it was built using a weak value mapping. In practice, users making tons of signals are using Signal() directly, and the weak referencing violates the principle of least surprise in code like `signal('foo').connect(...)`. Previous code is available as WeakNamespace for the time being. The implementation is trivial and will likely be dropped in the future unless use cases are voiced.
* Upgrade temporarily_connected_to to a deprecation warning.jason kirtland2011-10-261-1/+1
|
* Update test suite to pass under pypy1.5 (gc collection for refs)jason kirtland2011-05-011-12/+15
|
* Added Signal.receiver_connected and .receiver_disconnected per-Signal signals.jason kirtland2011-03-141-0/+139
| | | | Deprecates the global 'receiver_connected' signal.
* Added Signal.connect_via() decorator.jason kirtland2010-07-211-0/+26
|
* Added note about Jython compiler workaround in weakref test.jason kirtland2010-03-291-3/+7
|
* Woot, 1.0 works on Jython too.jason kirtland2010-03-281-2/+31
|
* Added ``Signal.temporarily_connected_to`` context managerjason kirtland2010-02-141-0/+8
|
* Initial import from flatland.util.signalsjason kirtland2010-02-141-0/+235