Opened 18 months ago

Last modified 18 months ago

#3647 new defect

Master is not compatible with Python 2.6

Reported by: dcoshea Owned by:
Priority: major Milestone: undecided
Version: 0.9.1 Keywords: latent
Cc:

Description

https://docs.buildbot.net/0.9.1/manual/installation/requirements.html#common-requirements says "Both Buildbot master and Buildbot worker require Python-2.6, although Python-2.7 is recommended."

When I created a virtualenv on my CentOS 6 system, which has the python-2.6.6-66.el6_8.x86_64 package installed, then ran pip install buildbot, buildbot create-master -r directory failed with:

[...]/virtualenv/lib/python2.6/site-packages/twisted/internet/endpoints.py:30: DeprecationWarning: twisted.internet.interfaces.IStreamClientEndpointStringParser was deprecated in Twisted 14.0.0: This interface has been superseded by IStreamClientEndpointStringParserWithReactor.
  from twisted.internet.interfaces import (
Traceback (most recent call last):
  File "./buildbot", line 9, in <module>
    load_entry_point('buildbot==0.9.1', 'console_scripts', 'buildbot')()
  File "[...]/virtualenv/lib/python2.6/site-packages/buildbot/scripts/runner.py", line 755, in run
    subcommandFunction = reflect.namedObject(subconfig.subcommandFunction)
  File "[...]/virtualenv/lib/python2.6/site-packages/twisted/python/reflect.py", line 168, in namedObject
    module = namedModule('.'.join(classSplit[:-1]))
  File "[...]/virtualenv/lib/python2.6/site-packages/twisted/python/reflect.py", line 154, in namedModule
    topLevel = __import__(name)
  File "[...]/virtualenv/lib/python2.6/site-packages/buildbot/scripts/create_master.py", line 28, in <module>
    from buildbot.master import BuildMaster
  File "[...]/virtualenv/lib/python2.6/site-packages/buildbot/master.py", line 36, in <module>
    from buildbot.buildbot_net_usage_data import sendBuildbotNetUsageData
  File "[...]/virtualenv/lib/python2.6/site-packages/buildbot/buildbot_net_usage_data.py", line 31, in <module>
    from buildbot.process.buildstep import _BuildStepFactory
  File "[...]/virtualenv/lib/python2.6/site-packages/buildbot/process/buildstep.py", line 42, in <module>
    from buildbot.process import remotecommand
  File "[...]/virtualenv/lib/python2.6/site-packages/buildbot/process/remotecommand.py", line 29, in <module>
    from buildbot.worker.protocols import base
  File "[...]/virtualenv/lib/python2.6/site-packages/buildbot/worker/__init__.py", line 16, in <module>
    from buildbot.worker.latent import AbstractLatentWorker
  File "[...]/virtualenv/lib/python2.6/site-packages/buildbot/worker/latent.py", line 59
    return {wfb for wfb in itervalues(self.workerforbuilders)
                  ^
SyntaxError: invalid syntax

latent.py seems to be using dict comprehension syntax {wfb for wfb in ...} which is only supported with Python 2.7 and later. http://stackoverflow.com/a/1747827 provides a suggestion on how to achieve the same goal with Python 2.6.

Change History (1)

comment:1 Changed 18 months ago by dcoshea

Using Python 2.7 via the CentOS SCL rebuild python27-python-2.7.8-16.el6.x86_64 worked around this.

Note: See TracTickets for help on using tickets.