1 |
floppym 13/05/23 01:28:07 |
2 |
|
3 |
Modified: jinja-2.6-python3.3.patch |
4 |
Log: |
5 |
Cleanup python3.3 patch based on feedback from Arfrever. |
6 |
|
7 |
(Portage version: 2.2.0_alpha176/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4) |
8 |
|
9 |
Revision Changes Path |
10 |
1.2 dev-python/jinja/files/jinja-2.6-python3.3.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/jinja/files/jinja-2.6-python3.3.patch?rev=1.2&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/jinja/files/jinja-2.6-python3.3.patch?rev=1.2&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/jinja/files/jinja-2.6-python3.3.patch?r1=1.1&r2=1.2 |
15 |
|
16 |
Index: jinja-2.6-python3.3.patch |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/dev-python/jinja/files/jinja-2.6-python3.3.patch,v |
19 |
retrieving revision 1.1 |
20 |
retrieving revision 1.2 |
21 |
diff -u -r1.1 -r1.2 |
22 |
--- jinja-2.6-python3.3.patch 28 Apr 2013 16:14:34 -0000 1.1 |
23 |
+++ jinja-2.6-python3.3.patch 23 May 2013 01:28:07 -0000 1.2 |
24 |
@@ -1,62 +1,3 @@ |
25 |
-diff --git a/docs/jinjaext.py b/docs/jinjaext.py |
26 |
-index 12b5447..8395a55 100644 |
27 |
---- a/docs/jinjaext.py |
28 |
-+++ b/docs/jinjaext.py |
29 |
-@@ -8,6 +8,7 @@ |
30 |
- :copyright: Copyright 2008 by Armin Ronacher. |
31 |
- :license: BSD. |
32 |
- """ |
33 |
-+import collections |
34 |
- import os |
35 |
- import re |
36 |
- import inspect |
37 |
-@@ -22,6 +23,7 @@ from pygments.style import Style |
38 |
- from pygments.token import Keyword, Name, Comment, String, Error, \ |
39 |
- Number, Operator, Generic |
40 |
- from jinja2 import Environment, FileSystemLoader |
41 |
-+from jinja2.utils import next |
42 |
- |
43 |
- |
44 |
- def parse_rst(state, content_offset, doc): |
45 |
-@@ -110,10 +112,10 @@ def dump_functions(mapping): |
46 |
- def directive(dirname, arguments, options, content, lineno, |
47 |
- content_offset, block_text, state, state_machine): |
48 |
- reverse_mapping = {} |
49 |
-- for name, func in mapping.iteritems(): |
50 |
-+ for name, func in mapping.items(): |
51 |
- reverse_mapping.setdefault(func, []).append(name) |
52 |
- filters = [] |
53 |
-- for func, names in reverse_mapping.iteritems(): |
54 |
-+ for func, names in reverse_mapping.items(): |
55 |
- aliases = sorted(names, key=lambda x: len(x)) |
56 |
- name = aliases.pop() |
57 |
- filters.append((name, aliases, func)) |
58 |
-@@ -145,9 +147,9 @@ def jinja_nodes(dirname, arguments, options, content, lineno, |
59 |
- doc.append(p + '.. autoclass:: %s(%s)' % (node.__name__, sig), '') |
60 |
- if node.abstract: |
61 |
- members = [] |
62 |
-- for key, name in node.__dict__.iteritems(): |
63 |
-+ for key, name in node.__dict__.items(): |
64 |
- if not key.startswith('_') and \ |
65 |
-- not hasattr(node.__base__, key) and callable(name): |
66 |
-+ not hasattr(node.__base__, key) and isinstance(name, collections.Callable): |
67 |
- members.append(key) |
68 |
- if members: |
69 |
- members.sort() |
70 |
-@@ -169,10 +171,10 @@ def inject_toc(app, doctree, docname): |
71 |
- titleiter = iter(doctree.traverse(nodes.title)) |
72 |
- try: |
73 |
- # skip first title, we are not interested in that one |
74 |
-- titleiter.next() |
75 |
-- title = titleiter.next() |
76 |
-+ next(titleiter) |
77 |
-+ title = next(titleiter) |
78 |
- # and check if there is at least another title |
79 |
-- titleiter.next() |
80 |
-+ next(titleiter) |
81 |
- except StopIteration: |
82 |
- return |
83 |
- tocnode = nodes.section('') |
84 |
diff --git a/jinja2/environment.py b/jinja2/environment.py |
85 |
index ebb5454..1b5dc40 100644 |
86 |
--- a/jinja2/environment.py |