Support Python >= 3.7 and PyPy. Python 2, Python < 3.7, and Jython may continue to work, but the next release will make incompatible changes.
Verified Python 3.4 support, no changes needed.
Additional bookkeeping cleanup for non-
ANYconnections at disconnect time.
Signal._cleanup_bookeeping()to prune stale bookkeeping on demand.
The global signal stash behind
signal()is now backed by a regular name-to-
Signaldictionary. Previously, weak references were held in the mapping and ephermal usage in code like
signal('foo').connect(...)could have surprising program behavior depending on import order of modules.
Namespaceis now built on a regular dict. Use
WeakNamespacefor the older, weak-referencing behavior.
Signal.connect('text-sender')uses an alterate hashing strategy to avoid sharp edges in text identity.
Deprecated the global
Verified Python 3.2 support, no changes needed.
signal.connected_toshorthand name for the
Python 3.0 and 3.1 compatibility.
Docs! Sphinx docs, project web site.
Added Python 2.4 compatibility.
Added nearly functional Python 3.1 compatibility. Everything except connecting to instance methods seems to work.
Copyright 2010 Jason Kirtland
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.