[Checkins] SVN: zc.signalhandler/trunk/s import zc.signalhandler 1.1 (building history)
Fred Drake
fdrake at gmail.com
Thu Nov 11 23:48:02 EST 2010
Log message for revision 118351:
import zc.signalhandler 1.1 (building history)
Changed:
U zc.signalhandler/trunk/setup.py
U zc.signalhandler/trunk/src/zc/signalhandler/README.txt
U zc.signalhandler/trunk/src/zc/signalhandler/datatypes.py
-=-
Modified: zc.signalhandler/trunk/setup.py
===================================================================
--- zc.signalhandler/trunk/setup.py 2010-11-12 04:46:22 UTC (rev 118350)
+++ zc.signalhandler/trunk/setup.py 2010-11-12 04:48:02 UTC (rev 118351)
@@ -2,7 +2,7 @@
setup(
name="zc.signalhandler",
- version="1.0",
+ version="1.1",
packages=find_packages("src"),
package_dir={"": "src"},
install_requires=["ZConfig >= 2.4a3"],
Modified: zc.signalhandler/trunk/src/zc/signalhandler/README.txt
===================================================================
--- zc.signalhandler/trunk/src/zc/signalhandler/README.txt 2010-11-12 04:46:22 UTC (rev 118350)
+++ zc.signalhandler/trunk/src/zc/signalhandler/README.txt 2010-11-12 04:48:02 UTC (rev 118351)
@@ -35,7 +35,7 @@
...
... %import zc.signalhandler
...
- ... <signalhandlers>
+ ... <signalhandlers foo>
... hup zc.signalhandler.tests.sample_handler_1
... hup zc.signalhandler.tests.sample_handler_2
... usr1 zc.signalhandler.tests.sample_handler_1
@@ -93,3 +93,12 @@
Now let's restore the previous behavior of the signal::
>>> x = signal.signal(signal.SIGUSR1, old)
+
+The section value provides a couple of attributes that are used solely
+to support the ``zope.app.appsetup.product`` APIs::
+
+ >>> config.siginfo.getSectionName()
+ 'foo'
+
+ >>> config.siginfo.mapping is config.siginfo
+ True
Modified: zc.signalhandler/trunk/src/zc/signalhandler/datatypes.py
===================================================================
--- zc.signalhandler/trunk/src/zc/signalhandler/datatypes.py 2010-11-12 04:46:22 UTC (rev 118350)
+++ zc.signalhandler/trunk/src/zc/signalhandler/datatypes.py 2010-11-12 04:48:02 UTC (rev 118351)
@@ -102,6 +102,7 @@
def __init__(self, section):
self.handlers = section.mapping
+ self.name = section.getSectionName()
# Convert to an isolated signalnum->[handlers] mapping:
self._handlers = {}
@@ -130,3 +131,12 @@
def _dispatch(self, signum, frame):
for f in self._handlers[signum]:
f()
+
+ # HACK: Thse are needed to keep zope.app.appsetup.product happy.
+
+ def getSectionName(self):
+ return self.name
+
+ @property
+ def mapping(self):
+ return self
More information about the checkins
mailing list