Repository: buildbot/buildbot

Issue:
travis: drop testing on unsupported SQLAlchemy versions + add minimum supported version conf
According to [docs](http://docs.buildbot.net/latest/manual/installation/requirements.html#buildmaster-requirements) minimum supported version of SQLAlchemy is 0.8.0.



Discussion:

Resolving patch:
diff --git a/master/buildbot/steps/source/oldsource.py b/master/buildbot/steps/source/oldsource.py
--- a/master/buildbot/steps/source/oldsource.py
+++ b/master/buildbot/steps/source/oldsource.py
@@ -26,7 +26,8 @@
 class _ComputeRepositoryURL(object):
     implements(IRenderable)
 
-    def __init__(self, repository):
+    def __init__(self, step, repository):
+        self.step = step
         self.repository = repository
 
     def getRenderingFor(self, props):
@@ -37,7 +38,7 @@ def getRenderingFor(self, props):
 
         build = props.getBuild()
         assert build is not None, "Build should be available *during* a build?"
-        s = build.getSourceStamp('') # TODO: use correct codebase
+        s = build.getSourceStamp(self.step.codebase)
 
         repository = self.repository
 
@@ -160,7 +161,7 @@ def __init__(self, cvsroot=None, cvsmodule="",
 
         self.checkoutDelay = checkoutDelay
         self.branch = branch
-        self.cvsroot = _ComputeRepositoryURL(cvsroot)
+        self.cvsroot = _ComputeRepositoryURL(self, cvsroot)
 
         Source.__init__(self, **kwargs)
 
@@ -287,8 +288,8 @@ def __init__(self, svnurl=None, baseURL=None, defaultBranch=None,
             warn("Please use workdir=, not directory=", DeprecationWarning)
             kwargs['workdir'] = directory
 
-        self.svnurl = svnurl and _ComputeRepositoryURL(svnurl)
-        self.baseURL = _ComputeRepositoryURL(baseURL)
+        self.svnurl = svnurl and _ComputeRepositoryURL(self, svnurl)
+        self.baseURL = _ComputeRepositoryURL(self, baseURL)
         self.branch = defaultBranch
         self.username = username
         self.password = password
@@ -439,8 +440,8 @@ def __init__(self, repourl=None, baseURL=None, defaultBranch=None,
                               C{baseURL} and the result handed to the
                               'darcs pull' command.
         """
-        self.repourl = _ComputeRepositoryURL(repourl)
-        self.baseURL = _ComputeRepositoryURL(baseURL)
+        self.repourl = _ComputeRepositoryURL(self, repourl)
+        self.baseURL = _ComputeRepositoryURL(self, baseURL)
         self.branch = defaultBranch
         Source.__init__(self, **kwargs)
         assert self.args['mode'] != "export", \
@@ -535,7 +536,7 @@ def __init__(self, repourl=None,
                          lack of output, but requires Git 1.7.2+.
         """
         Source.__init__(self, **kwargs)
-        self.repourl = _ComputeRepositoryURL(repourl)
+        self.repourl = _ComputeRepositoryURL(self, repourl)
         self.branch = branch
         self.args.update({'submodules': submodules,
                           'ignore_ignores': ignore_ignores,
@@ -604,7 +605,7 @@ def __init__(self,
 
         """
         Source.__init__(self, **kwargs)
-        self.manifest_url = _ComputeRepositoryURL(manifest_url)
+        self.manifest_url = _ComputeRepositoryURL(self, manifest_url)
         self.args.update({'manifest_branch': manifest_branch,
                           'manifest_file': manifest_file,
                           'tarball': tarball,
@@ -744,8 +745,8 @@ def __init__(self, repourl=None, baseURL=None, defaultBranch=None,
                                 if not using update/copy mode, or if using
                                 update/copy mode with multiple branches.
         """
-        self.repourl = _ComputeRepositoryURL(repourl)
-        self.baseURL = _ComputeRepositoryURL(baseURL)
+        self.repourl = _ComputeRepositoryURL(self, repourl)
+        self.baseURL = _ComputeRepositoryURL(self, baseURL)
         self.branch = defaultBranch
         Source.__init__(self, **kwargs)
         self.args.update({'forceSharedRepo': forceSharedRepo})
@@ -827,8 +828,8 @@ def __init__(self, repourl=None, baseURL=None, defaultBranch=None,
                                       at each branch change. Otherwise, just
                                       update to the branch.
         """
-        self.repourl = _ComputeRepositoryURL(repourl)
-        self.baseURL = _ComputeRepositoryURL(baseURL)
+        self.repourl = _ComputeRepositoryURL(self, repourl)
+        self.baseURL = _ComputeRepositoryURL(self, baseURL)
         self.branch = defaultBranch
         self.branchType = branchType
         self.clobberOnBranchChange = clobberOnBranchChange
@@ -921,7 +922,7 @@ def __init__(self, p4base=None, defaultBranch=None, p4port=None, p4user=None,
         @param p4client: The perforce client to use for this buildslave.
         """
 
-        self.p4base = _ComputeRepositoryURL(p4base)
+        self.p4base = _ComputeRepositoryURL(self, p4base)
         self.branch = defaultBranch
         Source.__init__(self, **kwargs)
         self.args['p4port'] = p4port
@@ -1023,7 +1024,7 @@ def __init__(self, repourl=None, branch=None, progress=False, **kwargs):
                          lack of output.
         """
         Source.__init__(self, **kwargs)
-        self.repourl = _ComputeRepositoryURL(repourl)
+        self.repourl = _ComputeRepositoryURL(self, repourl)
         if (not repourl):
             raise ValueError("you must provide a repository uri in 'repourl'")
         if (not branch):


Test patch:
diff --git a/master/buildbot/test/unit/test_steps_source_oldsource_ComputeRepositoryURL.py b/master/buildbot/test/unit/test_steps_source_oldsource_ComputeRepositoryURL.py
--- a/master/buildbot/test/unit/test_steps_source_oldsource_ComputeRepositoryURL.py
+++ b/master/buildbot/test/unit/test_steps_source_oldsource_ComputeRepositoryURL.py
@@ -37,12 +37,15 @@ def render(self, value):
         self.props.build = self
         return defer.maybeDeferred(IRenderable(value).getRenderingFor, self.props)
 
+class FakeStep(object):
+    codebase = ''
+
 class RepoURL(unittest.TestCase):
     def setUp(self):
         self.build = Build()
 
     def test_backward_compatibility(self):
-        url = _ComputeRepositoryURL("repourl")
+        url = _ComputeRepositoryURL(FakeStep(), "repourl")
         d = self.build.render(url)
         @d.addCallback
         def callback(res):
@@ -50,7 +53,7 @@ def callback(res):
         return d
 
     def test_format_string(self):
-        url = _ComputeRepositoryURL("http://server/%s")
+        url = _ComputeRepositoryURL(FakeStep(), "http://server/%s")
         d = self.build.render(url)
         @d.addCallback
         def callback(res):
@@ -60,7 +63,7 @@ def callback(res):
     def test_dict(self):
         dict = {}
         dict['test'] = "ssh://server/testrepository"
-        url = _ComputeRepositoryURL(dict)
+        url = _ComputeRepositoryURL(FakeStep(), dict)
         d = self.build.render(url)
         @d.addCallback
         def callback(res):
@@ -69,7 +72,7 @@ def callback(res):
 
     def test_callable(self):
         func = lambda x: x[::-1]
-        url = _ComputeRepositoryURL(func)
+        url = _ComputeRepositoryURL(FakeStep(), func)
         d = self.build.render(url)
         @d.addCallback
         def callback(res):
@@ -77,7 +80,7 @@ def callback(res):
         return d
 
     def test_backward_compatibility_render(self):
-        url = _ComputeRepositoryURL(WithProperties("repourl%(foo)s"))
+        url = _ComputeRepositoryURL(FakeStep(), WithProperties("repourl%(foo)s"))
         d = self.build.render(url)
         @d.addCallback
         def callback(res):
@@ -86,7 +89,7 @@ def callback(res):
 
     def test_dict_render(self):
         d = dict(test=WithProperties("repourl%(foo)s"))
-        url = _ComputeRepositoryURL(d)
+        url = _ComputeRepositoryURL(FakeStep(), d)
         d = self.build.render(url)
         @d.addCallback
         def callback(res):
@@ -95,7 +98,7 @@ def callback(res):
 
     def test_callable_render(self):
         func = lambda x: WithProperties(x+"%(foo)s")
-        url = _ComputeRepositoryURL(func)
+        url = _ComputeRepositoryURL(FakeStep(), func)
         d = self.build.render(url)
         @d.addCallback
         def callback(res):