[Python-modules-commits] [python-django] 02/02: Drop fix-assertRaisesMessage.patch and fix-test-extended-length-storage.patch which have been merged upstream.
Raphaël Hertzog
hertzog at moszumanska.debian.org
Thu Jul 9 00:10:21 UTC 2015
This is an automated email from the git hooks/post-receive script.
hertzog pushed a commit to branch debian/experimental
in repository python-django.
commit adeb0fbf463c95836db4887b8dd599da0497cec3
Author: Raphaël Hertzog <hertzog at debian.org>
Date: Thu Jul 9 02:09:57 2015 +0200
Drop fix-assertRaisesMessage.patch and fix-test-extended-length-storage.patch which have been merged upstream.
---
debian/changelog | 2 +
debian/patches/fix-assertRaisesMessage.patch | 56 ----------------------
.../patches/fix-test-extended-length-storage.patch | 54 ---------------------
debian/patches/series | 2 -
4 files changed, 2 insertions(+), 112 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index a203622..9bf7c3d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ python-django (1.8.3-1) experimental; urgency=medium
- CVE-2015-5144: possible header injection since validators accept
newlines in input
- CVE-2015-5145: possible denial-of-service in URL validation
+ * Drop fix-assertRaisesMessage.patch and
+ fix-test-extended-length-storage.patch which have been merged upstream.
-- Raphaël Hertzog <hertzog at debian.org> Thu, 09 Jul 2015 01:53:02 +0200
diff --git a/debian/patches/fix-assertRaisesMessage.patch b/debian/patches/fix-assertRaisesMessage.patch
deleted file mode 100644
index e5e939d..0000000
--- a/debian/patches/fix-assertRaisesMessage.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Description: Fix assertRaisesMessage() with python 2.7.10~rc1 and Python 3.5
- The failures are due to the change described in
- https://bugs.python.org/issue24134. The changes got reverted
- in stable releases but not in Python 3.5 so this patch
- is still needed for Python 3.5 compatibility...
-Origin: upstream, https://github.com/django/django/commit/c2bc1cefdcbbf074408f4a4cace88b315cf9d652 https://github.com/django/django/commit/e89c3a46035e9fe17c373a6c9cd63b9fd631d596
-Author: Tim Graham <timograham at gmail.com>
-Bug: https://code.djangoproject.com/ticket/23763
-Applied-Upstream: 1.9
-
---- a/django/test/testcases.py
-+++ b/django/test/testcases.py
-@@ -565,8 +565,7 @@ class SimpleTestCase(unittest.TestCase):
- msg_prefix + "Template '%s' was used unexpectedly in rendering"
- " the response" % template_name)
-
-- def assertRaisesMessage(self, expected_exception, expected_message,
-- callable_obj=None, *args, **kwargs):
-+ def assertRaisesMessage(self, expected_exception, expected_message, *args, **kwargs):
- """
- Asserts that the message in a raised exception matches the passed
- value.
-@@ -574,12 +573,15 @@ class SimpleTestCase(unittest.TestCase):
- Args:
- expected_exception: Exception class expected to be raised.
- expected_message: expected error message string value.
-- callable_obj: Function to be called.
-- args: Extra args.
-+ args: Function to be called and extra positional args.
- kwargs: Extra kwargs.
- """
-+ # callable_obj was a documented kwarg in Django 1.8 and older.
-+ callable_obj = kwargs.pop('callable_obj', None)
-+ if callable_obj:
-+ args = (callable_obj,) + args
- return six.assertRaisesRegex(self, expected_exception,
-- re.escape(expected_message), callable_obj, *args, **kwargs)
-+ re.escape(expected_message), *args, **kwargs)
-
- def assertFieldOutput(self, fieldclass, valid, invalid, field_args=None,
- field_kwargs=None, empty_value=''):
---- a/tests/test_utils/tests.py
-+++ b/tests/test_utils/tests.py
-@@ -752,6 +752,12 @@ class AssertRaisesMsgTest(SimpleTestCase
- raise ValueError("[.*x+]y?")
- self.assertRaisesMessage(ValueError, "[.*x+]y?", func1)
-
-+ def test_callable_obj_param(self):
-+ # callable_obj was a documented kwarg in Django 1.8 and older.
-+ def func1():
-+ raise ValueError("[.*x+]y?")
-+ self.assertRaisesMessage(ValueError, "[.*x+]y?", callable_obj=func1)
-+
-
- class AssertFieldOutputTests(SimpleTestCase):
-
diff --git a/debian/patches/fix-test-extended-length-storage.patch b/debian/patches/fix-test-extended-length-storage.patch
deleted file mode 100644
index 043ade8..0000000
--- a/debian/patches/fix-test-extended-length-storage.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-Description: Fix failing test when AUFS is in use
- AUFS only supports filenames up to 242 characters and a test
- was wrongly assuming that a 255 characters filename would be possible.
-Bug: https://code.djangoproject.com/ticket/24826
-Author: Claude Paroz <claude at 2xlibre.net> with changes by Raphaël Hertzog <hertzog at debian.org>
-
---- a/django/core/files/storage.py
-+++ b/django/core/files/storage.py
-@@ -13,7 +13,7 @@ from django.utils.crypto import get_rand
- from django.utils.deconstruct import deconstructible
- from django.utils.deprecation import RemovedInDjango20Warning
- from django.utils.encoding import filepath_to_uri, force_text
--from django.utils.functional import LazyObject
-+from django.utils.functional import LazyObject, cached_property
- from django.utils.module_loading import import_string
- from django.utils.six.moves.urllib.parse import urljoin
- from django.utils.text import get_valid_filename
-@@ -27,6 +27,8 @@ class Storage(object):
- storage systems can inherit or override, as necessary.
- """
-
-+ MAX_FILENAME_LENGTH = 255 # Should be safe on most backends
-+
- # The following methods represent a public interface to private methods.
- # These shouldn't be overridden by subclasses unless absolutely necessary.
-
-@@ -198,6 +200,16 @@ class FileSystemStorage(Storage):
- else settings.FILE_UPLOAD_DIRECTORY_PERMISSIONS
- )
-
-+ @cached_property
-+ def MAX_FILENAME_LENGTH(self):
-+ dir_to_test = self.location
-+ while not os.path.exists(dir_to_test):
-+ dir_to_test = os.path.dirname(dir_to_test)
-+ try:
-+ return os.pathconf(dir_to_test, 'PC_NAME_MAX')
-+ except Exception:
-+ return Storage.MAX_FILENAME_LENGTH
-+
- def _open(self, name, mode='rb'):
- return File(open(self.path(name), mode))
-
---- a/tests/file_storage/tests.py
-+++ b/tests/file_storage/tests.py
-@@ -534,7 +534,7 @@ class FileFieldStorageTests(SimpleTestCa
- def test_extended_length_storage(self):
- # Testing FileField with max_length > 255. Most systems have filename
- # length limitation of 255. Path takes extra chars.
-- filename = 251 * 'a' # 4 chars for extension.
-+ filename = (temp_storage.MAX_FILENAME_LENGTH - 4) * 'a' # 4 chars for extension.
- obj = Storage()
- obj.extended_length.save('%s.txt' % filename, ContentFile('Same Content'))
- self.assertEqual(obj.extended_length.name, 'tests/%s.txt' % filename)
diff --git a/debian/patches/series b/debian/patches/series
index bd6c5cb..9b1ddfc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,2 @@
-fix-assertRaisesMessage.patch
-fix-test-extended-length-storage.patch
02_disable-sources-in-sphinxdoc.diff
06_use_debian_geoip_database_as_default.diff
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-django.git
More information about the Python-modules-commits
mailing list