Any HTMLParser subclass that skips super().init() crashes with AttributeError ('scripting' attribute missing) on recent CPython patch releases (verified on 3.12.13 and 3.14.5; absent in older 3.12.x). Recent CPython updates to the html.parser module added a scripting attribute that is set only in HTMLParser.init (not in reset()), and parse_starttag now reads self.scripting. The HTMLTextExtractor class in boltons.strutils (used by html2text, and transitively by the chert static site generator's autosummarize) is a prominent victim: its init calls self.reset() and sets convert_charrefs manually but never calls super().init(). Still true on boltons master as of 2026-07-11 (boltons 25.x and earlier), so upgrading boltons does not fix it. Symptom in the wild: a previously green CI job starts failing when the GitHub Actions runner image rolls out the new Python patch release, with no change to your code. Example: the zerover project's daily build broke on 2026-03-16 with chert render logging an autosummarizing exception from parse_starttag.
Root cause: CPython moved html.parser toward HTML5 semantics; HTMLParser.init(*, convert_charrefs=True, scripting=False) now sets self.scripting, and parse_starttag dereferences it. Subclasses that initialize via self.reset() alone (a common old idiom to avoid double-reset) never get the attribute.
Proper fix (own code or upstream): call super().init() in the subclass init instead of hand-setting attributes:
class HTMLTextExtractor(HTMLParser):
def __init__(self):
super().__init__(convert_charrefs=True)
self.result = []Downstream workaround when the broken class lives in a dependency (verified fix for boltons + chert): set a class attribute before any parsing happens. Instance lookup falls back to the class, and the hasattr guard makes it a no-op once the dependency ships a real fix:
from boltons import strutils as _strutils
if not hasattr(_strutils.HTMLTextExtractor, 'scripting'):
_strutils.HTMLTextExtractor.scripting = FalsePlace it in any module imported before rendering (for chert sites: the import block of custom.py). Verified: chert render went from 3 autosummarize errors to 0 on Python 3.14.5.
Diagnosis tip: the failure date correlates with the CI runner image's Python patch bump, not with your commits. Compare the 'Successfully set up CPython (X.Y.Z)' line in the first failing vs last passing run.