Thank you for the feedback thus far on this. For trusty and xenial I accounted for Python 2 compatibility and wrote a backport of getattr_static: ``` def getattr_static_py2(obj, attr, default=None): """ Mimic getattr_static from Python 3 in Python 2.7. """ for cls in inspect.getmro(type(obj)): if attr in cls.__dict__: return cls.__dict__[attr] return getattr(obj, attr, default) ``` Unfortunately, I did not have the same foresight to do this for bionic and focal. I am in the process of modifying the patches for bionic and focal to reference this function instead.
** Changed in: jinja2 (Ubuntu) Status: Confirmed => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2102129 Title: Fix for CVE-2025-27516 regressed jinja in Python2 on focal To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/jinja2/+bug/2102129/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs