[Python-modules-commits] [django-taggit] 01/03: Imported Upstream version 0.17.6
Michal Cihar
nijel at moszumanska.debian.org
Mon Dec 14 07:21:08 UTC 2015
This is an automated email from the git hooks/post-receive script.
nijel pushed a commit to branch master
in repository django-taggit.
commit 931989242fa6bdb6b533cacf00373f8dfb26a05a
Author: Michal Čihař <nijel at debian.org>
Date: Mon Dec 14 08:04:35 2015 +0100
Imported Upstream version 0.17.6
---
CHANGELOG.txt | 5 +++++
PKG-INFO | 2 +-
django_taggit.egg-info/PKG-INFO | 2 +-
runtests.py | 1 -
taggit/__init__.py | 2 +-
taggit/models.py | 6 ++++--
tests/tests.py | 7 +++----
7 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index d2cbaee..5d9a65c 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,11 @@
Changelog
=========
+0.17.6 (2015-12-09)
+~~~~~~~~~~~~~~~~~~~
+ * Silence Django 1.9 warning
+ * https://github.com/alex/django-taggit/pull/366
+
0.17.5 (2015-11-27)
~~~~~~~~~~~~~~~~~~~
* Django 1.9 compatibility fix
diff --git a/PKG-INFO b/PKG-INFO
index 9e33f98..f194e4f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: django-taggit
-Version: 0.17.5
+Version: 0.17.6
Summary: django-taggit is a reusable Django application for simple tagging.
Home-page: http://github.com/alex/django-taggit/tree/master
Author: Alex Gaynor
diff --git a/django_taggit.egg-info/PKG-INFO b/django_taggit.egg-info/PKG-INFO
index 9e33f98..f194e4f 100644
--- a/django_taggit.egg-info/PKG-INFO
+++ b/django_taggit.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: django-taggit
-Version: 0.17.5
+Version: 0.17.6
Summary: django-taggit is a reusable Django application for simple tagging.
Home-page: http://github.com/alex/django-taggit/tree/master
Author: Alex Gaynor
diff --git a/runtests.py b/runtests.py
index 517dd80..57e9aa0 100755
--- a/runtests.py
+++ b/runtests.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python
-import os
import sys
from django.conf import settings
diff --git a/taggit/__init__.py b/taggit/__init__.py
index 499f12d..6910041 100644
--- a/taggit/__init__.py
+++ b/taggit/__init__.py
@@ -1 +1 @@
-VERSION = (0, 17, 5)
+VERSION = (0, 17, 6)
diff --git a/taggit/models.py b/taggit/models.py
index 4e86658..1378784 100644
--- a/taggit/models.py
+++ b/taggit/models.py
@@ -113,11 +113,13 @@ class ItemBase(models.Model):
@classmethod
def tag_model(cls):
- return _get_field(cls, 'tag').rel.to
+ field = _get_field(cls, 'tag')
+ return field.remote_field.model if VERSION >= (1, 9) else field.rel.to
@classmethod
def tag_relname(cls):
- return _get_field(cls, 'tag').rel.related_name
+ field = _get_field(cls, 'tag')
+ return field.remote_field.related_name if VERSION >= (1, 9) else field.rel.related_name
@classmethod
def lookup_kwargs(cls, instance):
diff --git a/tests/tests.py b/tests/tests.py
index b6ba3bb..de60f9a 100644
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -20,8 +20,7 @@ from .models import (Article, Child, CustomManager, CustomPKFood,
DirectHousePet, DirectPet, Food, HousePet, Movie,
OfficialFood, OfficialHousePet, OfficialPet,
OfficialTag, OfficialThroughModel, Pet, Photo,
- TaggedCustomPK, TaggedCustomPKFood, TaggedCustomPKPet,
- TaggedFood, TaggedPet)
+ TaggedCustomPK, TaggedCustomPKFood, TaggedFood)
from taggit.managers import _model_name, _TaggableManager, TaggableManager
from taggit.models import Tag, TaggedItem
@@ -393,7 +392,7 @@ class TaggableManagerTestCase(BaseTaggingTestCase):
apple = self.food_model.objects.create(name="apple")
apple.tags.add('1', '2')
with self.assertNumQueries(2):
- l = list(self.food_model.objects.prefetch_related('tags').all())
+ list(self.food_model.objects.prefetch_related('tags').all())
join_clause = 'INNER JOIN "%s"' % self.taggeditem_model._meta.db_table
self.assertEqual(connection.queries[-1]['sql'].count(join_clause), 1, connection.queries[-2:])
@@ -457,7 +456,7 @@ class TaggableManagerOfficialTestCase(TaggableManagerTestCase):
pear = self.food_model.objects.create(name="pear")
pear.tags.add("green", "delicious")
- tag_info = self.tag_model.objects.filter(officialfood__in=[apple.id, pear.id],name='green').annotate(models.Count('name'))
+ tag_info = self.tag_model.objects.filter(officialfood__in=[apple.id, pear.id], name='green').annotate(models.Count('name'))
self.assertEqual(tag_info[0].name__count, 2)
class TaggableManagerInitializationTestCase(TaggableManagerTestCase):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/django-taggit.git
More information about the Python-modules-commits
mailing list