jlec 15/02/28 18:08:42
Added: django-1.6.10-test.patch
django-1.4.19-bashcomp.patch
django-1.6.10-bashcomp.patch
django-1.4.19-test.patch
Log:
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
(Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key
B9D4F231BD1558AB!)
Revision Changes Path
1.1 dev-python/django/files/django-1.6.10-test.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/files/django-1.6.10-test.patch?rev=1.1&view=markup
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
Index: django-1.6.10-test.patch
===================================================================
django/core/management/commands/makemessages.py | 4 ++--
tests/i18n/commands/extraction.py | 14 +++++++++++---
tests/utils_tests/test_jslex.py | 2 +-
3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/django/core/management/commands/makemessages.py
b/django/core/management/commands/makemessages.py
index 5b09661..c8f05ac 100644
--- a/django/core/management/commands/makemessages.py
+++ b/django/core/management/commands/makemessages.py
@@ -90,7 +90,7 @@ class TranslatableFile(object):
orig_file = os.path.join(self.dirpath, self.file)
is_templatized = file_ext in command.extensions
if is_templatized:
- with open(orig_file, "rU") as fp:
+ with open(orig_file, "r") as fp:
src_data = fp.read()
thefile = '%s.py' % self.file
content = templatize(src_data, orig_file[2:])
@@ -404,7 +404,7 @@ class Command(NoArgsCommand):
for domain in domains:
django_po = os.path.join(django_dir, 'conf', 'locale', locale,
'LC_MESSAGES', '%s.po' % domain)
if os.path.exists(django_po):
- with io.open(django_po, 'rU', encoding='utf-8') as fp:
+ with io.open(django_po, 'r', encoding='utf-8') as fp:
m = plural_forms_re.search(fp.read())
if m:
plural_form_line = force_str(m.group('value'))
diff --git a/tests/i18n/commands/extraction.py
b/tests/i18n/commands/extraction.py
index e0b6deb..06cf50d 100644
--- a/tests/i18n/commands/extraction.py
+++ b/tests/i18n/commands/extraction.py
@@ -5,6 +5,7 @@ import io
import os
import re
import shutil
+import sys
import warnings
from django.core import management
@@ -141,6 +142,10 @@ class BasicExtractorTests(ExtractorTests):
self.assertIn("UnicodeDecodeError: skipped file not_utf8.txt in .",
force_text(stdout.getvalue()))
+ # This issue is fixed in 1.8+ (#23312).
+ if six.PY3 and sys.platform.startswith('win'):
+ test_unicode_decode_error = expectedFailure(test_unicode_decode_error)
+
def test_extraction_warning(self):
"""test xgettext warning about multiple bare interpolation
placeholders"""
os.chdir(self.test_dir)
@@ -206,13 +211,16 @@ class BasicExtractorTests(ExtractorTests):
self.assertEqual(len(ws), 3)
for w in ws:
self.assertTrue(issubclass(w.category,
TranslatorCommentWarning))
- six.assertRegex(self, str(ws[0].message),
+ six.assertRegex(
+ self, str(ws[0].message),
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\."
)
- six.assertRegex(self, str(ws[1].message),
+ six.assertRegex(
+ self, str(ws[1].message),
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\."
)
- six.assertRegex(self, str(ws[2].message),
+ six.assertRegex(
+ self, str(ws[2].message),
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\."
)
# Now test .po file contents
diff --git a/tests/utils_tests/test_jslex.py b/tests/utils_tests/test_jslex.py
index a2af7b4..e696149 100644
--- a/tests/utils_tests/test_jslex.py
+++ b/tests/utils_tests/test_jslex.py
@@ -1,5 +1,5 @@
+# -*- coding: utf-8 -*-
"""Tests for jslex."""
-# encoding: utf-8
# originally from https://bitbucket.org/ned/jslex
from django.test import TestCase
1.1 dev-python/django/files/django-1.4.19-bashcomp.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/files/django-1.4.19-bashcomp.patch?rev=1.1&view=markup
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
Index: django-1.4.19-bashcomp.patch
===================================================================
extras/django_bash_completion | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/extras/django_bash_completion b/extras/django_bash_completion
old mode 100755
new mode 100644
index 1c3887e..748227d
--- a/extras/django_bash_completion
+++ b/extras/django_bash_completion
@@ -37,7 +37,7 @@ _django_completion()
COMP_CWORD=$COMP_CWORD \
DJANGO_AUTO_COMPLETE=1 $1 ) )
}
-complete -F _django_completion -o default django-admin.py manage.py
django-admin
+complete -F _django_completion -o default django-admin.py django-admin
_python_django_completion()
{
@@ -55,18 +55,3 @@ _python_django_completion()
fi
fi
}
-
-# Support for multiple interpreters.
-unset pythons
-if command -v whereis &>/dev/null; then
- python_interpreters=$(whereis python | cut -d " " -f 2-)
- for python in $python_interpreters; do
- pythons="${pythons} $(basename -- $python)"
- done
- pythons=$(echo $pythons | tr " " "\n" | sort -u | tr "\n" " ")
-else
- pythons=python
-fi
-
-complete -F _python_django_completion -o default $pythons
-
1.1 dev-python/django/files/django-1.6.10-bashcomp.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/files/django-1.6.10-bashcomp.patch?rev=1.1&view=markup
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
Index: django-1.6.10-bashcomp.patch
===================================================================
extras/django_bash_completion | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/extras/django_bash_completion b/extras/django_bash_completion
index 8f85211..ab13755 100755
--- a/extras/django_bash_completion
+++ b/extras/django_bash_completion
@@ -37,7 +37,7 @@ _django_completion()
COMP_CWORD=$COMP_CWORD \
DJANGO_AUTO_COMPLETE=1 $1 ) )
}
-complete -F _django_completion -o default django-admin.py manage.py
django-admin
+complete -F _django_completion -o default django-admin.py django-admin
_python_django_completion()
{
@@ -55,18 +55,3 @@ _python_django_completion()
fi
fi
}
-
-# Support for multiple interpreters.
-unset pythons
-if command -v whereis &>/dev/null; then
- python_interpreters=$(whereis python | cut -d " " -f 2-)
- for python in $python_interpreters; do
- pythons="${pythons} ${python##*/}"
- done
- pythons=$(echo $pythons | tr " " "\n" | sort -u | tr "\n" " ")
-else
- pythons=python
-fi
-
-complete -F _python_django_completion -o default $pythons
-
1.1 dev-python/django/files/django-1.4.19-test.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django/files/django-1.4.19-test.patch?rev=1.1&view=markup
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
Index: django-1.4.19-test.patch
===================================================================
tests/regressiontests/utils/jslex.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/regressiontests/utils/jslex.py
b/tests/regressiontests/utils/jslex.py
index 7cd93ca..24317ff 100644
--- a/tests/regressiontests/utils/jslex.py
+++ b/tests/regressiontests/utils/jslex.py
@@ -1,5 +1,5 @@
+# -*- coding: utf-8 -*-
"""Tests for jslex."""
-# encoding: utf-8
# originally from https://bitbucket.org/ned/jslex
from django.test import TestCase