[Buildbot-commits] buildbot/buildbot master.py,1.68,1.69

Brian Warner warner at users.sourceforge.net
Wed May 4 06:44:33 UTC 2005


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

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

remove deprecated config keys

	* buildbot/master.py (BuildMaster.loadConfig): finally remove
	deprecated config keys: webPortnum, webPathname, irc, manholePort,
	and configuring builders with tuples.
	* buildbot/test/test_config.py: stop testing compatibility with
	deprecated config keys
	* buildbot/test/test_run.py: same


Index: master.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/master.py,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- master.py	4 May 2005 02:09:38 -0000	1.68
+++ master.py	4 May 2005 06:44:30 -0000	1.69
@@ -744,8 +744,7 @@
         known_keys = "bots sources builders slavePortnum " + \
                      "debugPassword manhole " + \
                      "interlocks status projectName projectURL buildbotURL"
-        deprecated_keys = "webPortnum webPathname irc"
-        known_keys = (known_keys + " " + deprecated_keys).split()
+        known_keys = known_keys.split()
         for k in config.keys():
             if k not in known_keys:
                 log.msg("unknown key '%s' defined in config dictionary" % k)
@@ -758,7 +757,6 @@
             slavePortnum = config['slavePortnum']
 
             # optional
-            irc = config.get('irc')
             debugPassword = config.get('debugPassword')
             manhole = config.get('manhole')
             interlocks = config.get('interlocks', [])
@@ -767,10 +765,6 @@
             projectURL = config.get('projectURL')
             buildbotURL = config.get('buildbotURL')
 
-            # deprecated
-            webPortnum = config.get('webPortnum')
-            webPathname = config.get('webPathname')
-            manholePort = config.get('manholePort')
         except KeyError, e:
             log.msg("config dictionary is missing a required parameter")
             log.msg("leaving old configuration in place")
@@ -792,8 +786,6 @@
                     why = ("builder '%s' appears multiple times for " + \
                            "interlock %s") % (bname, name)
                     raise ValueError, why
-        if webPortnum is not None and type(webPortnum) != int:
-            raise TypeError, "webPortnum '%s' must be an int" % webPortnum
         for s in status:
             assert interfaces.IStatusReceiver(s)
 
@@ -802,11 +794,6 @@
         dirnames = []
         for b in builders:
             if type(b) is tuple:
-                warnings.warn("defining builder %s with a tuple is deprecated"
-                              ", please use a dict instead" % b[0],
-                              DeprecationWarning)
-                continue
-            if type(b) is tuple:
                 raise ValueError("builder %s must be defined with a dict, "
                                  "not a tuple" % b[0])
             if b['slavename'] not in slavenames:
@@ -841,11 +828,7 @@
             self.checker.addUser("debug", debugPassword)
             self.debugPassword = debugPassword
 
-        # self.manholePort
-        if manholePort is not None:
-            warnings.warn("c['manholePort'] is deprecated, use c['manhole'] = master.Manhole(port, username, password) instead",
-                          DeprecationWarning)
-            manhole = Manhole(manholePort, "admin", "admin")
+        # self.manhole
         if manhole != self.manhole:
             # changing
             if self.manhole:
@@ -863,7 +846,7 @@
         # botmaster will handle startup/shutdown issues.
         dl.append(self.loadConfig_Builders(builders))
 
-        d = self.loadConfig_status(status, irc, webPortnum, webPathname)
+        d = self.loadConfig_status(status)
         dl.append(d)
 
         # self.slavePort
@@ -923,12 +906,6 @@
         newNames = []
         newList = {}
         for data in newBuilders:
-            if type(data) is tuple:
-                name, slavename, builddir, factory = data
-                data = {'name': name,
-                        'slavename': slavename,
-                        'builddir': builddir,
-                        'factory': factory}
             name = data['name']
             newList[name] = data
             newNames.append(name)
@@ -983,30 +960,7 @@
         self.botmaster.builderNames = newNames
         return defer.DeferredList(dl)
 
-    def loadConfig_status(self, status,
-                          irc=None, webPortnum=None, webPathname=None):
-
-        # these three are for backwards compatibility
-
-        if irc is not None:
-            warnings.warn("c['irc'] is deprecated, use c['status'] = [words.IRC(args)] instead",
-                          DeprecationWarning)
-            for addr,v in irc.items():
-                host, port = addr
-                assert port == 6667                    
-                nick, channels = v
-                status.append(IRC(host, nick, channels))
-
-        if webPortnum is not None:
-            warnings.warn("c['webPortnum'] is deprecated, use c['status'] = [html.Waterfall(http_port=PORT)] instead",
-                          DeprecationWarning)
-            status.append(Waterfall(http_port=webPortnum))
-        if webPathname is not None:
-            warnings.warn("c['webPathname'] is deprecated, use c['status'] = [html.Waterfall(distrib_port=NAME)] instead",
-                          DeprecationWarning)
-            status.append(Waterfall(distrib_port=webPathname))
-
-        # here is where the real work happens
+    def loadConfig_status(self, status):
         dl = []
 
         # remove old ones





More information about the Commits mailing list