Skip to content

Commit

Permalink
make var unpacking deterministic in compiler, fixes pallets#2021
Browse files Browse the repository at this point in the history
  • Loading branch information
anentropic committed Sep 3, 2024
1 parent 6f155d6 commit bc9c59e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jinja2/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ def pop_assign_tracking(self, frame: Frame) -> None:
self.writeline("_block_vars.update({")
else:
self.writeline("context.vars.update({")
for idx, name in enumerate(vars):
for idx, name in enumerate(sorted(vars)):
if idx:
self.write(", ")
ref = frame.symbols.ref(name)
Expand Down

0 comments on commit bc9c59e

Please sign in to comment.