def updateVersion(self, version):
        if not self.directory.basename() == "twisted":
            raise Exception("Can't change the version of subprojects.")

        oldVersion = self.getVersion()
        replaceProjectVersion(self.directory.child("_version.py").path,
                              version)
        _changeVersionInFile(
            oldVersion, version,
            self.directory.child("topfiles").child("README").path)
Replace the existing version numbers in _version.py and README files
dataset/ETHPy150Open twisted/twisted/twisted/python/_release.py/Project.updateVersion