def patch_bug4520(): # this bug was patched in twisted-11.1.0, and only affects py26 and up py_26 = (sys.version_info[0] > 2 or (sys.version_info[0] == 2 and sys.version_info[1] >= 6)) if twisted.version < versions.Version('twisted', 11, 1, 0) and py_26: from buildbot.monkeypatches import bug4520 bug4520.patch()