Package: python-django Hey, Two new versions of Django has been released: 1.2.2 which fixes xss vulnerability and 1.2.3 fixing regressions found in 1.2.2. I've already prepared an update for Ubuntu 10.10 and, while doing that, have worked on getting unit test running once again.
Attached is a patch against 1.2.1-1 that makes some changes required to get test suite running once again. The dependency on "locales-all | language-pack-en-base" makes it possible to remove delta between Debian and Ubuntu once again. The package builds on both Ubuntu 10.10 and on Debian Unstable and all tests that are enabled (I think we are missing a few of them actually but will dig into that later) pass. Cheers, KK -- Sent from Ubuntu
=== modified file 'debian/changelog' --- debian/changelog 2010-05-24 22:44:32 +0000 +++ debian/changelog 2010-09-14 19:34:19 +0000 @@ -1,3 +1,20 @@ +python-django (1.2.3-1) UNRELEASED; urgency=low + + * New upstream release. (LP: #636482) + * Fixes both a XSS vulnerability introduced in 1.2 series and + the regressions caused by 1.2.2 release. + * debian/control: + - depend on language packs for en_US.utf8 locales required for unit tests. + * debian/rules: + - re-enable build time tests. + - set LC_ALL to en_US.utf8 for test suite. + * debian/patches/series: + - two new patches: 05_fix_regression_tests.diff and + 06_fix_regression_tests.diff backported from 1.2.x branch to fix + test suite failures. + + -- Krzysztof Klimonda <[email protected]> Sun, 12 Sep 2010 18:10:01 +0200 + python-django (1.2.1-1) unstable; urgency=low * New upstream bugfix release. === modified file 'debian/control' --- debian/control 2010-05-21 07:52:55 +0000 +++ debian/control 2010-09-14 19:40:11 +0000 @@ -4,7 +4,7 @@ Maintainer: Chris Lamb <[email protected]> Uploaders: Debian Python Modules Team <[email protected]>, Raphaƫl Hertzog <[email protected]> Standards-Version: 3.8.4 -Build-Depends: debhelper (>= 7.0.50), python-support, quilt (>= 0.46-7~), python (>= 2.5) | python-sqlite +Build-Depends: debhelper (>= 7.0.50), python-support, quilt (>= 0.46-7~), python (>= 2.5) | python-sqlite, locales-all | language-pack-en-base Build-Depends-Indep: python-sphinx, libjs-jquery Homepage: http://www.djangoproject.com/ Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-django/trunk/ === added file 'debian/patches/05_fix_regression_tests.diff' --- debian/patches/05_fix_regression_tests.diff 1970-01-01 00:00:00 +0000 +++ debian/patches/05_fix_regression_tests.diff 2010-09-14 19:10:27 +0000 @@ -0,0 +1,39 @@ +Description: Adjust AdminDocTests to run after r13728. Also match comments + to tests and add test that was there in comment form only. +Origin: upstream, http://code.djangoproject.com/changeset/13750 +Bug: http://code.djangoproject.com/ticket/3695 +--- a/tests/regressiontests/admin_views/tests.py (revision 13697) ++++ b/tests/regressiontests/admin_views/tests.py (revision 13750) +@@ -2207,14 +2207,17 @@ + + # A builtin tag exists in both the index and detail +- self.assertContains(response, '<h3 id="autoescape">autoescape</h3>') +- self.assertContains(response, '<li><a href="#autoescape">autoescape</a></li>') ++ self.assertContains(response, '<h3 id="built_in-autoescape">autoescape</h3>') ++ self.assertContains(response, '<li><a href="#built_in-autoescape">autoescape</a></li>') + + # An app tag exists in both the index and detail +- # The builtin tag group exists ++ self.assertContains(response, '<h3 id="flatpages-get_flatpages">get_flatpages</h3>') ++ self.assertContains(response, '<li><a href="#flatpages-get_flatpages">get_flatpages</a></li>') ++ ++ # The admin list tag group exists + self.assertContains(response, "<h2>admin_list</h2>", count=2) + +- # A builtin tag exists in both the index and detail +- self.assertContains(response, '<h3 id="autoescape">autoescape</h3>') +- self.assertContains(response, '<li><a href="#admin_actions">admin_actions</a></li>') ++ # An admin list tag exists in both the index and detail ++ self.assertContains(response, '<h3 id="admin_list-admin_actions">admin_actions</h3>') ++ self.assertContains(response, '<li><a href="#admin_list-admin_actions">admin_actions</a></li>') + + def test_filters(self): +@@ -2225,6 +2228,6 @@ + + # A builtin filter exists in both the index and detail +- self.assertContains(response, '<h3 id="add">add</h3>') +- self.assertContains(response, '<li><a href="#add">add</a></li>') ++ self.assertContains(response, '<h3 id="built_in-add">add</h3>') ++ self.assertContains(response, '<li><a href="#built_in-add">add</a></li>') + + except ImportError: === added file 'debian/patches/06_fix_regression_tests.diff' --- debian/patches/06_fix_regression_tests.diff 1970-01-01 00:00:00 +0000 +++ debian/patches/06_fix_regression_tests.diff 2010-09-14 19:10:27 +0000 @@ -0,0 +1,16 @@ +Description: A second part of patch to update AdminDocsTest to fix test suite. +Source: upstream, http://code.djangoproject.com/changeset/13764 + +Index: /django/branches/releases/1.2.X/tests/regressiontests/admin_views/tests.py +=================================================================== +--- a/tests/regressiontests/admin_views/tests.py (revision 13750) ++++ b/tests/regressiontests/admin_views/tests.py (revision 13764) +@@ -2211,6 +2211,6 @@ + + # An app tag exists in both the index and detail +- self.assertContains(response, '<h3 id="flatpages-get_flatpages">get_flatpages</h3>') +- self.assertContains(response, '<li><a href="#flatpages-get_flatpages">get_flatpages</a></li>') ++ self.assertContains(response, '<h3 id="comments-get_comment_count">get_comment_count</h3>') ++ self.assertContains(response, '<li><a href="#comments-get_comment_count">get_comment_count</a></li>') + + # The admin list tag group exists === modified file 'debian/patches/series' --- debian/patches/series 2010-05-21 07:52:55 +0000 +++ debian/patches/series 2010-09-14 19:10:27 +0000 @@ -1,3 +1,5 @@ 01_disable_url_verify_regression_tests.diff 03_manpage.diff 04_hyphen-manpage.diff +05_fix_regression_tests.diff +06_fix_regression_tests.diff === modified file 'debian/rules' --- debian/rules 2010-05-06 10:25:10 +0000 +++ debian/rules 2010-09-14 20:15:19 +0000 @@ -9,7 +9,7 @@ dh --with quilt $@ override_dh_auto_clean: - rm -rf docs.debian testproject + rm -rf docs.debian tests/__init__.py find -name "*.DS_Store" -delete dh_auto_clean @@ -24,10 +24,9 @@ make -C docs.debian html rm -rf docs.debian/_build/html/_sources/ -override_dh_auto_test_DISABLED: - PYTHONPATH=. django/bin/django-admin.py startproject testproject - cat debian/test_settings.py >> testproject/settings.py - PYTHONPATH=. tests/runtests.py --settings=testproject.settings --verbosity=2 +override_dh_auto_test: + touch tests/__init__.py + LC_ALL=en_US.utf8 PYTHONPATH=. tests/runtests.py --settings=tests.test_sqlite --verbosity=2 override_dh_install: dh_install === removed file 'debian/test_settings.py' --- debian/test_settings.py 2010-01-06 14:34:37 +0000 +++ debian/test_settings.py 1970-01-01 00:00:00 +0000 @@ -1,18 +0,0 @@ -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': '', # Or path to database file if using sqlite3. - 'USER': '', # Not used with sqlite3. - 'PASSWORD': '', # Not used with sqlite3. - 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. - 'PORT': '', # Set to empty string for default. Not used with sqlite3. - }, - 'other': { - 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': '', # Or path to database file if using sqlite3. - 'USER': '', # Not used with sqlite3. - 'PASSWORD': '', # Not used with sqlite3. - 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. - 'PORT': '', # Set to empty string for default. Not used with sqlite3. - }, -}
signature.asc
Description: This is a digitally signed message part

