[Buildbot-commits] buildbot/buildbot/process step_twisted2.py,1.1,1.2 base.py,1.51,1.52 builder.py,1.25,1.26

Brian Warner warner at users.sourceforge.net
Tue May 17 10:14:12 UTC 2005


Update of /cvsroot/buildbot/buildbot/buildbot/process
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9810/buildbot/process

Modified Files:
	step_twisted2.py base.py builder.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-187
Creator:  Brian Warner <warner at monolith.lothar.com>

fix deprecation warnings in test suite

	* everything: fixed all deprecation warnings when running against
	Twisted-2.0 . (at least all the ones in buildbot code, there are a
	few that come from Twisted itself). This involved putting most of
	the Twisted-version specific code in the new buildbot.twcompat
	module, and creating some abstract base classes in
	buildbot.changes.base and buildbot.status.base (which might be
	useful anyway). __implements__ is a nuisance and requires an ugly
	'if' clause everywhere.

	* buildbot/test/test_status.py (Mail.testMail): add a 0.1 second
	delay before finishing the test: it seems that smtp.sendmail
	doesn't hang up on the server, so we must wait a moment so it can
	hang up on us. This removes the trial warning about an unclean
	reactor.


Index: base.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/base.py,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- base.py	6 May 2005 04:42:41 -0000	1.51
+++ base.py	17 May 2005 10:14:10 -0000	1.52
@@ -10,6 +10,7 @@
 import twisted.web.util
 
 from buildbot import interfaces
+from buildbot.twcompat import implements
 from buildbot.util import now
 from buildbot.status.builder import SUCCESS, WARNINGS, FAILURE, EXCEPTION
 from buildbot.status.builder import Results
@@ -524,7 +525,10 @@
         self.builder.testsFinished(results)
 
 class BuildControl(components.Adapter):
-    __implements__ = interfaces.IBuildControl,
+    if implements:
+        implements(interfaces.IBuildControl)
+    else:
+        __implements__ = interfaces.IBuildControl,
 
     def getStatus(self):
         return self.original.build_status

Index: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/builder.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- builder.py	26 Apr 2005 07:16:36 -0000	1.25
+++ builder.py	17 May 2005 10:14:10 -0000	1.26
@@ -5,6 +5,7 @@
 from twisted.internet import reactor, defer
 
 from buildbot import interfaces
+from buildbot.twcompat import implements
 from buildbot.status.progress import Expectations
 from buildbot.status import builder
 from buildbot.util import now
@@ -473,7 +474,11 @@
         self.d.callback(ponged)
 
 class BuilderControl(components.Adapter):
-    __implements__ = interfaces.IBuilderControl,
+    if implements:
+        implements(interfaces.IBuilderControl)
+    else:
+        __implements__ = interfaces.IBuilderControl,
+
     def forceBuild(self, who, reason):
         bc = self.original.forceBuild(who, reason)
         return bc

Index: step_twisted2.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/step_twisted2.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- step_twisted2.py	5 May 2003 21:52:48 -0000	1.1
+++ step_twisted2.py	17 May 2005 10:14:10 -0000	1.2
@@ -5,6 +5,7 @@
      BuildStep
 from buildbot.process.step_twisted import RunUnitTests
 
+from zope.interface import implements
 from twisted.python import log, failure
 from twisted.spread import jelly
 from twisted.web.util import formatFailure
@@ -67,7 +68,7 @@
     machine-parseable results as the tests are run.
     """
     trialMode = "--jelly"
-    __implements__ = (remote.IRemoteReporter,)
+    implements(remote.IRemoteReporter)
 
     ourtypes = { ResultTypes.SKIP: tests.SKIP,
                  ResultTypes.EXPECTED_FAILURE: tests.EXPECTED_FAILURE,





More information about the Commits mailing list