def _changeNewsVersion(self, news, name, oldVersion, newVersion, today):
        newHeader = self._formatHeader(
            "Twisted %s %s (%s)" % (name, newVersion.base(), today))
        expectedHeaderRegex = re.compile(
            r"Twisted %s %s \(\d{4}-\d\d-\d\d\)\n=+\n\n" % (
                re.escape(name), re.escape(oldVersion.base())))
        oldNews = news.getContent()
        match = expectedHeaderRegex.search(oldNews)
        if match:
            oldHeader = match.group()
            replaceInFile(news.path, {oldHeader: newHeader})
Change all references to the current version number in a NEWS file to
dataset/ETHPy150Open twisted/twisted/twisted/python/_release.py/NewsBuilder._changeNewsVersion