While technically this applies to any scope and not just for loops
it comes up most commonly in the context of for loops. This now
defines the behavior for scoping in a way that is consistent but
different than it was in the past. There is an ongoing conversation
if we should keep it that way or not.
Variables defined in an outer scope can no longer be set from an inner scope (see
pallets/jinja#641). Regardless of whether that is right or wrong, we can't control if
people are using such constructs in their plugins, which versions of Jinja >= 2.9 would
now break out of the blue, regardless of OctoPrint version. That is unacceptable sadly
and requires pinning for now, until plugin authors have had a chance to adapt
Also see #1697.