diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2013-05-18 12:11:05 +0100 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2013-05-18 12:11:05 +0100 |
commit | 4cd6e9a8099e3587c736186ba1cb1d33c6101243 (patch) | |
tree | 2588c0e644aa00c694e869ba4169b7ddfe28cbad | |
parent | e2fc8749bcb4f9fdc8e26a00bc91ab801166d2af (diff) | |
parent | b9c76fb845ba3bb5ec0a1bd462097ceb626e7138 (diff) | |
download | jinja2-4cd6e9a8099e3587c736186ba1cb1d33c6101243.tar.gz |
Merge branch 'master' into sprint-branch
-rw-r--r-- | docs/faq.rst | 2 | ||||
-rw-r--r-- | docs/templates.rst | 2 | ||||
-rw-r--r-- | ext/django2jinja/django2jinja.py | 2 | ||||
-rw-r--r-- | jinja2/compiler.py | 6 | ||||
-rw-r--r-- | jinja2/sandbox.py | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/docs/faq.rst b/docs/faq.rst index d066bff..5c80d33 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -174,7 +174,7 @@ harder to maintain the code for older Python versions. If you really need Python 2.3 support you either have to use `Jinja 1`_ or other templating engines that still support 2.3. -My Macros are overriden by something +My Macros are overridden by something ------------------------------------ In some situations the Jinja scoping appears arbitrary: diff --git a/docs/templates.rst b/docs/templates.rst index 790b95e..e121033 100644 --- a/docs/templates.rst +++ b/docs/templates.rst @@ -862,7 +862,7 @@ namespace:: </dl> <p>{{ textarea('comment') }}</p> -Macros and variables starting with one ore more underscores are private and +Macros and variables starting with one or more underscores are private and cannot be imported. .. versionchanged:: 2.4 diff --git a/ext/django2jinja/django2jinja.py b/ext/django2jinja/django2jinja.py index 6d9e76c..ad9627f 100644 --- a/ext/django2jinja/django2jinja.py +++ b/ext/django2jinja/django2jinja.py @@ -609,7 +609,7 @@ def width_ratio(writer, node): @node(core_tags.WithNode) def with_block(writer, node): writer.warn('with block expanded into set statement. This could cause ' - 'variables following that block to be overriden.', node) + 'variables following that block to be overridden.', node) writer.start_block() writer.write('set %s = ' % node.name) writer.node(node.var) diff --git a/jinja2/compiler.py b/jinja2/compiler.py index 24bf252..47bd6ec 100644 --- a/jinja2/compiler.py +++ b/jinja2/compiler.py @@ -665,16 +665,16 @@ class CodeGenerator(NodeVisitor): # it without aliasing all the variables. # this could be fixed in Python 3 where we have the nonlocal # keyword or if we switch to bytecode generation - overriden_closure_vars = ( + overridden_closure_vars = ( func_frame.identifiers.undeclared & func_frame.identifiers.declared & (func_frame.identifiers.declared_locally | func_frame.identifiers.declared_parameter) ) - if overriden_closure_vars: + if overridden_closure_vars: self.fail('It\'s not possible to set and access variables ' 'derived from an outer scope! (affects: %s)' % - ', '.join(sorted(overriden_closure_vars)), node.lineno) + ', '.join(sorted(overridden_closure_vars)), node.lineno) # remove variables from a closure from the frame's undeclared # identifiers. diff --git a/jinja2/sandbox.py b/jinja2/sandbox.py index b880250..ed145d5 100644 --- a/jinja2/sandbox.py +++ b/jinja2/sandbox.py @@ -115,7 +115,7 @@ def is_internal_attribute(obj, attr): """Test if the attribute given is an internal python attribute. For example this function returns `True` for the `func_code` attribute of python objects. This is useful if the environment method - :meth:`~SandboxedEnvironment.is_safe_attribute` is overriden. + :meth:`~SandboxedEnvironment.is_safe_attribute` is overridden. >>> from jinja2.sandbox import is_internal_attribute >>> is_internal_attribute(lambda: None, "func_code") |