[Python-modules-commits] r30057 - in packages/python-django-tagging/trunk/debian (4 files)

hertzog at users.alioth.debian.org hertzog at users.alioth.debian.org
Wed Aug 6 11:34:02 UTC 2014


    Date: Wednesday, August 6, 2014 @ 11:34:01
  Author: hertzog
Revision: 30057

* Add fix-testsuite.patch and now run the testsuite.
* Add django-1.7-compat.patch to make it work with Django 1.7.
  Closes: #755624

Added:
  packages/python-django-tagging/trunk/debian/patches/django-1.7-compat.patch
  packages/python-django-tagging/trunk/debian/patches/fix-testsuite.patch
Modified:
  packages/python-django-tagging/trunk/debian/changelog
  packages/python-django-tagging/trunk/debian/patches/series

Modified: packages/python-django-tagging/trunk/debian/changelog
===================================================================
--- packages/python-django-tagging/trunk/debian/changelog	2014-08-06 11:25:21 UTC (rev 30056)
+++ packages/python-django-tagging/trunk/debian/changelog	2014-08-06 11:34:01 UTC (rev 30057)
@@ -1,6 +1,9 @@
-python-django-tagging (1:0.3.1-4) UNRELEASED; urgency=medium
+python-django-tagging (1:0.3.1-4) unstable; urgency=medium
 
   * Drop David Spreen from Uploaders. Closes: #738932
+  * Add fix-testsuite.patch and now run the testsuite.
+  * Add django-1.7-compat.patch to make it work with Django 1.7.
+    Closes: #755624
 
  -- Raphaël Hertzog <hertzog at debian.org>  Fri, 14 Feb 2014 09:31:36 +0100
 

Added: packages/python-django-tagging/trunk/debian/patches/django-1.7-compat.patch
===================================================================
--- packages/python-django-tagging/trunk/debian/patches/django-1.7-compat.patch	                        (rev 0)
+++ packages/python-django-tagging/trunk/debian/patches/django-1.7-compat.patch	2014-08-06 11:34:01 UTC (rev 30057)
@@ -0,0 +1,37 @@
+Description: Add django 1.7 compatibility
+Author: Raphaël Hertzog <hertzog at debian.org>
+Bug-Debian: http://bugs.debian.org/755624
+Origin: vendor
+Last-Update: 2014-08-06
+
+--- python-django-tagging-0.3.1.orig/tagging/models.py
++++ python-django-tagging-0.3.1/tagging/models.py
+@@ -17,6 +17,8 @@ from tagging import settings
+ from tagging.utils import calculate_cloud, get_tag_list, get_queryset_and_model, parse_tag_input
+ from tagging.utils import LOGARITHMIC
+ 
++import collections
++
+ qn = connection.ops.quote_name
+ 
+ ############
+@@ -166,9 +168,16 @@ class TagManager(models.Manager):
+             # Django 1.2+
+             compiler = queryset.query.get_compiler(using='default')
+             extra_joins = ' '.join(compiler.get_from_clause()[0][1:])
+-            where, params = queryset.query.where.as_sql(
+-                compiler.quote_name_unless_alias, compiler.connection
+-            )
++            if isinstance(compiler, collections.Callable):
++                # Django 1.7+
++                where, params = queryset.query.where.as_sql(
++                    compiler, compiler.connection
++                )
++            else:
++                # Django 1.2-1.6
++                where, params = queryset.query.where.as_sql(
++                    compiler.quote_name_unless_alias, compiler.connection
++                )
+         else:
+             # Django pre-1.2
+             extra_joins = ' '.join(queryset.query.get_from_clause()[0][1:])

Added: packages/python-django-tagging/trunk/debian/patches/fix-testsuite.patch
===================================================================
--- packages/python-django-tagging/trunk/debian/patches/fix-testsuite.patch	                        (rev 0)
+++ packages/python-django-tagging/trunk/debian/patches/fix-testsuite.patch	2014-08-06 11:34:01 UTC (rev 30057)
@@ -0,0 +1,39 @@
+Description: Fix settings for test suite
+Author: Raphaël Hertzog <hertzog at debian.org>
+Origin: vendor
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format.
+--- python-django-tagging-0.3.1.orig/tagging/tests/settings.py
++++ python-django-tagging-0.3.1/tagging/tests/settings.py
+@@ -3,22 +3,14 @@ DIRNAME = os.path.dirname(__file__)
+ 
+ DEFAULT_CHARSET = 'utf-8'
+ 
+-test_engine = os.environ.get("TAGGING_TEST_ENGINE", "sqlite3")
+-
+-DATABASE_ENGINE = test_engine
+-DATABASE_NAME = os.environ.get("TAGGING_DATABASE_NAME", "tagging_test")
+-DATABASE_USER = os.environ.get("TAGGING_DATABASE_USER", "")
+-DATABASE_PASSWORD = os.environ.get("TAGGING_DATABASE_PASSWORD", "")
+-DATABASE_HOST = os.environ.get("TAGGING_DATABASE_HOST", "localhost")
+-
+-if test_engine == "sqlite":
+-    DATABASE_NAME = os.path.join(DIRNAME, 'tagging_test.db')
+-    DATABASE_HOST = ""
+-elif test_engine == "mysql":
+-    DATABASE_PORT = os.environ.get("TAGGING_DATABASE_PORT", 3306)
+-elif test_engine == "postgresql_psycopg2":
+-    DATABASE_PORT = os.environ.get("TAGGING_DATABASE_PORT", 5432)
++DATABASES = {
++    'default': {
++        'ENGINE': 'django.db.backends.sqlite3',
++        'NAME': os.path.join(DIRNAME, 'tagging_test.db'),
++    }
++}
+ 
++SECRET_KEY = 'liewoo1jie7TahTao3ci7xayee8gieg9ukee'
+ 
+ INSTALLED_APPS = (
+     'django.contrib.contenttypes',

Modified: packages/python-django-tagging/trunk/debian/patches/series
===================================================================
--- packages/python-django-tagging/trunk/debian/patches/series	2014-08-06 11:25:21 UTC (rev 30056)
+++ packages/python-django-tagging/trunk/debian/patches/series	2014-08-06 11:34:01 UTC (rev 30057)
@@ -1 +1,3 @@
 fix_calc_tag_weight
+fix-testsuite.patch
+django-1.7-compat.patch




More information about the Python-modules-commits mailing list