[Python-modules-commits] r34085 - in packages/django-filter/trunk/debian (4 files)
bam at users.alioth.debian.org
bam at users.alioth.debian.org
Tue Sep 1 22:53:24 UTC 2015
Date: Tuesday, September 1, 2015 @ 22:53:23
Author: bam
Revision: 34085
New upstream version.
Added:
packages/django-filter/trunk/debian/patches/fix_tests.patch
Modified:
packages/django-filter/trunk/debian/changelog
packages/django-filter/trunk/debian/patches/series
Deleted:
packages/django-filter/trunk/debian/patches/fix_django1.7
Modified: packages/django-filter/trunk/debian/changelog
===================================================================
--- packages/django-filter/trunk/debian/changelog 2015-09-01 18:11:09 UTC (rev 34084)
+++ packages/django-filter/trunk/debian/changelog 2015-09-01 22:53:23 UTC (rev 34085)
@@ -1,3 +1,12 @@
+django-filter (0.11.0-1) unstable; urgency=medium
+
+ * New upstream version.
+ * Add fix_tests.patch, applied upstream see
+ https://github.com/alex/django-filter/pull/287
+ Closes: #796754: FTBFS: test_filtering_uses_distinct raises AttributeError
+
+ -- Brian May <bam at debian.org> Mon, 24 Aug 2015 11:52:41 +1000
+
django-filter (0.9.2-1) unstable; urgency=medium
* New upstream version.
Deleted: packages/django-filter/trunk/debian/patches/fix_django1.7
===================================================================
--- packages/django-filter/trunk/debian/patches/fix_django1.7 2015-09-01 18:11:09 UTC (rev 34084)
+++ packages/django-filter/trunk/debian/patches/fix_django1.7 2015-09-01 22:53:23 UTC (rev 34085)
@@ -1,66 +0,0 @@
-Index: django-filter/tests/models.py
-===================================================================
---- django-filter.orig/tests/models.py 2013-08-10 20:35:09.000000000 +1000
-+++ django-filter/tests/models.py 2014-08-11 10:00:33.823184110 +1000
-@@ -1,5 +1,6 @@
- from __future__ import absolute_import
- from __future__ import unicode_literals
-+from django.utils.encoding import python_2_unicode_compatible
-
- ### these models are for testing
- from django import forms
-@@ -38,6 +39,7 @@
- return super(SubnetMaskField, self).formfield(**defaults)
-
-
-+ at python_2_unicode_compatible
- class User(models.Model):
- username = models.CharField(max_length=255)
- first_name = SubCharField(max_length=100)
-@@ -49,18 +51,20 @@
-
- favorite_books = models.ManyToManyField('Book', related_name='lovers')
-
-- def __unicode__(self):
-+ def __str__(self):
- return self.username
-
-
-+ at python_2_unicode_compatible
- class AdminUser(User):
- class Meta:
- proxy = True
-
-- def __unicode__(self):
-+ def __str__(self):
- return "%s (ADMIN)" % self.username
-
-
-+ at python_2_unicode_compatible
- class Comment(models.Model):
- text = models.TextField()
- author = models.ForeignKey(User, related_name='comments')
-@@ -68,7 +72,7 @@
- date = models.DateField()
- time = models.TimeField()
-
-- def __unicode__(self):
-+ def __str__(self):
- return "%s said %s" % (self.author, self.text[:25])
-
-
-@@ -77,12 +81,13 @@
- author = models.ForeignKey(User, null=True)
-
-
-+ at python_2_unicode_compatible
- class Book(models.Model):
- title = models.CharField(max_length=100)
- price = models.DecimalField(max_digits=6, decimal_places=2)
- average_rating = models.FloatField()
-
-- def __unicode__(self):
-+ def __str__(self):
- return self.title
-
-
Added: packages/django-filter/trunk/debian/patches/fix_tests.patch
===================================================================
--- packages/django-filter/trunk/debian/patches/fix_tests.patch (rev 0)
+++ packages/django-filter/trunk/debian/patches/fix_tests.patch 2015-09-01 22:53:23 UTC (rev 34085)
@@ -0,0 +1,28 @@
+Index: django-filter/django_filters/filters.py
+===================================================================
+--- django-filter.orig/django_filters/filters.py
++++ django-filter/django_filters/filters.py
+@@ -84,9 +84,9 @@ class Filter(object):
+ lookup = self.lookup_type
+ if value in ([], (), {}, None, ''):
+ return qs
+- qs = self.get_method(qs)(**{'%s__%s' % (self.name, lookup): value})
+ if self.distinct:
+ qs = qs.distinct()
++ qs = self.get_method(qs)(**{'%s__%s' % (self.name, lookup): value})
+ return qs
+
+
+Index: django-filter/tests/test_filters.py
+===================================================================
+--- django-filter.orig/tests/test_filters.py
++++ django-filter/tests/test_filters.py
+@@ -189,7 +189,7 @@ class FilterTests(TestCase):
+ qs = mock.Mock(spec=['filter', 'distinct'])
+ f = Filter(name='somefield', distinct=True)
+ f.filter(qs, 'value')
+- result = qs.distinct.assert_called_once()
++ result = qs.distinct.assert_called_once_with()
+ self.assertNotEqual(qs, result)
+
+
Modified: packages/django-filter/trunk/debian/patches/series
===================================================================
--- packages/django-filter/trunk/debian/patches/series 2015-09-01 18:11:09 UTC (rev 34084)
+++ packages/django-filter/trunk/debian/patches/series 2015-09-01 22:53:23 UTC (rev 34085)
@@ -0,0 +1 @@
+fix_tests.patch
More information about the Python-modules-commits
mailing list