Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/django/files: django-1.6.10-test.patch django-1.4.19-bashcomp.patch django-1.6.10-bashcomp.patch django-1.4.19-test.patch
Date: Sat, 28 Feb 2015 18:08:46
Message-Id: 20150228180842.92F3812C03@oystercatcher.gentoo.org
1 jlec 15/02/28 18:08:42
2
3 Added: django-1.6.10-test.patch
4 django-1.4.19-bashcomp.patch
5 django-1.6.10-bashcomp.patch
6 django-1.4.19-test.patch
7 Log:
8 Version BUmp and drop old for CVE-2015-{0219,0220,0221,0222}, #536586; add correct dependencies for tests, Use optfeature instead of harddepened on imaging, #473228
9
10 (Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
11
12 Revision Changes Path
13 1.1 dev-python/django/files/django-1.6.10-test.patch
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/files/django-1.6.10-test.patch?rev=1.1&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/files/django-1.6.10-test.patch?rev=1.1&content-type=text/plain
17
18 Index: django-1.6.10-test.patch
19 ===================================================================
20 django/core/management/commands/makemessages.py | 4 ++--
21 tests/i18n/commands/extraction.py | 14 +++++++++++---
22 tests/utils_tests/test_jslex.py | 2 +-
23 3 files changed, 14 insertions(+), 6 deletions(-)
24
25 diff --git a/django/core/management/commands/makemessages.py b/django/core/management/commands/makemessages.py
26 index 5b09661..c8f05ac 100644
27 --- a/django/core/management/commands/makemessages.py
28 +++ b/django/core/management/commands/makemessages.py
29 @@ -90,7 +90,7 @@ class TranslatableFile(object):
30 orig_file = os.path.join(self.dirpath, self.file)
31 is_templatized = file_ext in command.extensions
32 if is_templatized:
33 - with open(orig_file, "rU") as fp:
34 + with open(orig_file, "r") as fp:
35 src_data = fp.read()
36 thefile = '%s.py' % self.file
37 content = templatize(src_data, orig_file[2:])
38 @@ -404,7 +404,7 @@ class Command(NoArgsCommand):
39 for domain in domains:
40 django_po = os.path.join(django_dir, 'conf', 'locale', locale, 'LC_MESSAGES', '%s.po' % domain)
41 if os.path.exists(django_po):
42 - with io.open(django_po, 'rU', encoding='utf-8') as fp:
43 + with io.open(django_po, 'r', encoding='utf-8') as fp:
44 m = plural_forms_re.search(fp.read())
45 if m:
46 plural_form_line = force_str(m.group('value'))
47 diff --git a/tests/i18n/commands/extraction.py b/tests/i18n/commands/extraction.py
48 index e0b6deb..06cf50d 100644
49 --- a/tests/i18n/commands/extraction.py
50 +++ b/tests/i18n/commands/extraction.py
51 @@ -5,6 +5,7 @@ import io
52 import os
53 import re
54 import shutil
55 +import sys
56 import warnings
57
58 from django.core import management
59 @@ -141,6 +142,10 @@ class BasicExtractorTests(ExtractorTests):
60 self.assertIn("UnicodeDecodeError: skipped file not_utf8.txt in .",
61 force_text(stdout.getvalue()))
62
63 + # This issue is fixed in 1.8+ (#23312).
64 + if six.PY3 and sys.platform.startswith('win'):
65 + test_unicode_decode_error = expectedFailure(test_unicode_decode_error)
66 +
67 def test_extraction_warning(self):
68 """test xgettext warning about multiple bare interpolation placeholders"""
69 os.chdir(self.test_dir)
70 @@ -206,13 +211,16 @@ class BasicExtractorTests(ExtractorTests):
71 self.assertEqual(len(ws), 3)
72 for w in ws:
73 self.assertTrue(issubclass(w.category, TranslatorCommentWarning))
74 - six.assertRegex(self, str(ws[0].message),
75 + six.assertRegex(
76 + self, str(ws[0].message),
77 r"The translator-targeted comment 'Translators: ignored i18n comment #1' \(file templates[/\\]comments.thtml, line 4\) was ignored, because it wasn't the last item on the line\."
78 )
79 - six.assertRegex(self, str(ws[1].message),
80 + six.assertRegex(
81 + self, str(ws[1].message),
82 r"The translator-targeted comment 'Translators: ignored i18n comment #3' \(file templates[/\\]comments.thtml, line 6\) was ignored, because it wasn't the last item on the line\."
83 )
84 - six.assertRegex(self, str(ws[2].message),
85 + six.assertRegex(
86 + self, str(ws[2].message),
87 r"The translator-targeted comment 'Translators: ignored i18n comment #4' \(file templates[/\\]comments.thtml, line 8\) was ignored, because it wasn't the last item on the line\."
88 )
89 # Now test .po file contents
90 diff --git a/tests/utils_tests/test_jslex.py b/tests/utils_tests/test_jslex.py
91 index a2af7b4..e696149 100644
92 --- a/tests/utils_tests/test_jslex.py
93 +++ b/tests/utils_tests/test_jslex.py
94 @@ -1,5 +1,5 @@
95 +# -*- coding: utf-8 -*-
96 """Tests for jslex."""
97 -# encoding: utf-8
98 # originally from https://bitbucket.org/ned/jslex
99
100 from django.test import TestCase
101
102
103
104 1.1 dev-python/django/files/django-1.4.19-bashcomp.patch
105
106 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/files/django-1.4.19-bashcomp.patch?rev=1.1&view=markup
107 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/files/django-1.4.19-bashcomp.patch?rev=1.1&content-type=text/plain
108
109 Index: django-1.4.19-bashcomp.patch
110 ===================================================================
111 extras/django_bash_completion | 17 +----------------
112 1 file changed, 1 insertion(+), 16 deletions(-)
113
114 diff --git a/extras/django_bash_completion b/extras/django_bash_completion
115 old mode 100755
116 new mode 100644
117 index 1c3887e..748227d
118 --- a/extras/django_bash_completion
119 +++ b/extras/django_bash_completion
120 @@ -37,7 +37,7 @@ _django_completion()
121 COMP_CWORD=$COMP_CWORD \
122 DJANGO_AUTO_COMPLETE=1 $1 ) )
123 }
124 -complete -F _django_completion -o default django-admin.py manage.py django-admin
125 +complete -F _django_completion -o default django-admin.py django-admin
126
127 _python_django_completion()
128 {
129 @@ -55,18 +55,3 @@ _python_django_completion()
130 fi
131 fi
132 }
133 -
134 -# Support for multiple interpreters.
135 -unset pythons
136 -if command -v whereis &>/dev/null; then
137 - python_interpreters=$(whereis python | cut -d " " -f 2-)
138 - for python in $python_interpreters; do
139 - pythons="${pythons} $(basename -- $python)"
140 - done
141 - pythons=$(echo $pythons | tr " " "\n" | sort -u | tr "\n" " ")
142 -else
143 - pythons=python
144 -fi
145 -
146 -complete -F _python_django_completion -o default $pythons
147 -
148
149
150
151 1.1 dev-python/django/files/django-1.6.10-bashcomp.patch
152
153 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/files/django-1.6.10-bashcomp.patch?rev=1.1&view=markup
154 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/files/django-1.6.10-bashcomp.patch?rev=1.1&content-type=text/plain
155
156 Index: django-1.6.10-bashcomp.patch
157 ===================================================================
158 extras/django_bash_completion | 17 +----------------
159 1 file changed, 1 insertion(+), 16 deletions(-)
160
161 diff --git a/extras/django_bash_completion b/extras/django_bash_completion
162 index 8f85211..ab13755 100755
163 --- a/extras/django_bash_completion
164 +++ b/extras/django_bash_completion
165 @@ -37,7 +37,7 @@ _django_completion()
166 COMP_CWORD=$COMP_CWORD \
167 DJANGO_AUTO_COMPLETE=1 $1 ) )
168 }
169 -complete -F _django_completion -o default django-admin.py manage.py django-admin
170 +complete -F _django_completion -o default django-admin.py django-admin
171
172 _python_django_completion()
173 {
174 @@ -55,18 +55,3 @@ _python_django_completion()
175 fi
176 fi
177 }
178 -
179 -# Support for multiple interpreters.
180 -unset pythons
181 -if command -v whereis &>/dev/null; then
182 - python_interpreters=$(whereis python | cut -d " " -f 2-)
183 - for python in $python_interpreters; do
184 - pythons="${pythons} ${python##*/}"
185 - done
186 - pythons=$(echo $pythons | tr " " "\n" | sort -u | tr "\n" " ")
187 -else
188 - pythons=python
189 -fi
190 -
191 -complete -F _python_django_completion -o default $pythons
192 -
193
194
195
196 1.1 dev-python/django/files/django-1.4.19-test.patch
197
198 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/files/django-1.4.19-test.patch?rev=1.1&view=markup
199 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/files/django-1.4.19-test.patch?rev=1.1&content-type=text/plain
200
201 Index: django-1.4.19-test.patch
202 ===================================================================
203 tests/regressiontests/utils/jslex.py | 2 +-
204 1 file changed, 1 insertion(+), 1 deletion(-)
205
206 diff --git a/tests/regressiontests/utils/jslex.py b/tests/regressiontests/utils/jslex.py
207 index 7cd93ca..24317ff 100644
208 --- a/tests/regressiontests/utils/jslex.py
209 +++ b/tests/regressiontests/utils/jslex.py
210 @@ -1,5 +1,5 @@
211 +# -*- coding: utf-8 -*-
212 """Tests for jslex."""
213 -# encoding: utf-8
214 # originally from https://bitbucket.org/ned/jslex
215
216 from django.test import TestCase