Skip to content
Myr

Merge pull request #188 from lemonad/master

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fixed typos: overriden to overridden

authored by Armin Ronacher · committed by Armin Ronacher · parents 728d69a, bdd09dd · Browse files · 4 files+6 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+6 added−6 removed

  • other:+6 added−6 removed

4 files+6 added−6 removed

modified:docs/faq.rst+1 added-1 removed
172 unmodified lines
173harder to maintain the code for older Python versions. If you really need174Python 2.3 support you either have to use `Jinja 1`_ or other templating175engines that still support 2.3.176177My Macros are overriden by something177My Macros are overridden by something178------------------------------------179180In some situations the Jinja scoping appears arbitrary:181
22 unmodified lines
modified:ext/django2jinja/django2jinja.py+1 added-1 removed
607 unmodified lines
608609@node(core_tags.WithNode)610def with_block(writer, node):611 writer.warn('with block expanded into set statement. This could cause '612 'variables following that block to be overriden.', node)612 'variables following that block to be overridden.', node)613 writer.start_block()614 writer.write('set %s = ' % node.name)615 writer.node(node.var)616 writer.end_block()
152 unmodified lines
modified:jinja2/compiler.py+3 added-3 removed
661 unmodified lines
662 # assertion error. Reason: we can't generate reasonable code from663 # it without aliasing all the variables.664 # this could be fixed in Python 3 where we have the nonlocal665 # keyword or if we switch to bytecode generation666 overriden_closure_vars = (666 overridden_closure_vars = (667 func_frame.identifiers.undeclared &668 func_frame.identifiers.declared &669 (func_frame.identifiers.declared_locally |670 func_frame.identifiers.declared_parameter)671 )672 if overriden_closure_vars:672 if overridden_closure_vars:673 self.fail('It\'s not possible to set and access variables '674 'derived from an outer scope! (affects: %s)' %675 ', '.join(sorted(overriden_closure_vars)), node.lineno)675 ', '.join(sorted(overridden_closure_vars)), node.lineno)676677 # remove variables from a closure from the frame's undeclared678 # identifiers.679 func_frame.identifiers.undeclared -= (
970 unmodified lines
modified:jinja2/sandbox.py+1 added-1 removed
112 unmodified lines
113def is_internal_attribute(obj, attr):114 """Test if the attribute given is an internal python attribute. For115 example this function returns `True` for the `func_code` attribute of116 python objects. This is useful if the environment method117 :meth:`~SandboxedEnvironment.is_safe_attribute` is overriden.117 :meth:`~SandboxedEnvironment.is_safe_attribute` is overridden.118119 >>> from jinja2.sandbox import is_internal_attribute120 >>> is_internal_attribute(lambda: None, "func_code")121 True
240 unmodified lines