[Python-modules-team] Django 1.9

Brian May bam at debian.org
Wed Nov 25 02:52:11 UTC 2015


Brian May <bam at debian.org> writes:

>> I really appreciate all the great work y'all have done to get us on Django
>> 1.8.  I was hoping that this would give us Python 3.5 support, but as you
>> know, upstream's documentation is incorrect about this, and then there's issue
>> 25502 tracking *actual* Python 3.5 support.
>
> I believe the Django in Debian passes all tests under Python 3.5...

Think I was mistaken. I applied to a change in git to test all Python
versions, however didn't push it as it broke the Python 2.7 tests for
reasons I didn't understand:


commit 40a9d73988425effca23abbd294b5fb3f23deca5
Author: Brian May <bam at debian.org>
Date:   Mon Oct 26 13:49:02 2015 +1100

    Run tests for Python3.4 and Python3.5

diff --git a/debian/rules b/debian/rules
index 9ef53f7..2260291 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,8 +21,8 @@ override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
        mkdir -p tmp-locales
        localedef -i /usr/share/i18n/locales/en_US -c -f UTF-8 -A /usr/share/locale/locale.alias tmp-locales/en_US.UTF-8
-       cd tests && LOCPATH=$(CURDIR)/tmp-locales LC_ALL=en_US.UTF-8 PYTHONPATH=.. python ./runtests.py --verbosity=2
-       cd tests && LOCPATH=$(CURDIR)/tmp-locales LC_ALL=en_US.UTF-8 PYTHONPATH=.. python3 ./runtests.py --verbosity=2
+       LOCPATH=$(CURDIR)/tmp-locales LC_ALL=en_US.UTF-8 PYTHONPATH=.. \
+           dh_auto_test -- --system=custom --test-args="cd tests && {interpreter} ./runtests.py --verbosity=2"
        rm -rf tmp-locales
 endif


Produces 2 errors:

======================================================================
FAIL: test_custom_project_template_from_tarball_by_url (admin_scripts.tests.StartProject)
Make sure the startproject management command is able to use a different project template from a tarball via a url
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/tests/admin_scripts/tests.py", line 1880, in test_custom_project_template_from_tarball_by_url
    self.assertNoOutput(err)
  File "/«PKGBUILDDIR»/tests/admin_scripts/tests.py", line 187, in assertNoOutput
    self.assertEqual(len(stream), 0, "Stream should be empty: actually contains '%s'" % stream)
AssertionError: Stream should be empty: actually contains 'Traceback (most recent call last):
  File "/«PKGBUILDDIR»/django/bin/django-admin.py", line 5, in <module>
    management.execute_from_command_line()
  File "/«PKGBUILDDIR»/django/core/management/__init__.py", line 351, in execute_from_command_line
    utility.execute()
  File "/«PKGBUILDDIR»/django/core/management/__init__.py", line 343, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/«PKGBUILDDIR»/django/core/management/base.py", line 394, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/«PKGBUILDDIR»/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/«PKGBUILDDIR»/django/core/management/commands/startproject.py", line 33, in handle
    super(Command, self).handle('project', project_name, target, **options)
  File "/«PKGBUILDDIR»/django/core/management/templates.py", line 116, in handle
    base_subdir)
  File "/«PKGBUILDDIR»/django/core/management/templates.py", line 199, in handle_template
    return self.extract(absolute_path)
  File "/«PKGBUILDDIR»/django/core/management/templates.py", line 293, in extract
    archive.extract(filename, tempdir)
  File "/«PKGBUILDDIR»/django/utils/archive.py", line 49, in extract
    with Archive(path) as archive:
  File "/«PKGBUILDDIR»/django/utils/archive.py", line 58, in __init__
    self._archive = self._archive_cls(file)(file)
  File "/«PKGBUILDDIR»/django/utils/archive.py", line 138, in __init__
    self._archive = tarfile.open(file)
  File "/usr/lib/python2.7/tarfile.py", line 1678, in open
    raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully
'

======================================================================
FAIL: test_project_template_tarball_url (admin_scripts.tests.StartProject)
Startproject management command handles project template tar/zip balls from non-canonical urls
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/tests/admin_scripts/tests.py", line 1893, in test_project_template_tarball_url
    self.assertNoOutput(err)
  File "/«PKGBUILDDIR»/tests/admin_scripts/tests.py", line 187, in assertNoOutput
    self.assertEqual(len(stream), 0, "Stream should be empty: actually contains '%s'" % stream)
AssertionError: Stream should be empty: actually contains 'Traceback (most recent call last):
  File "/«PKGBUILDDIR»/django/bin/django-admin.py", line 5, in <module>
    management.execute_from_command_line()
  File "/«PKGBUILDDIR»/django/core/management/__init__.py", line 351, in execute_from_command_line
    utility.execute()
  File "/«PKGBUILDDIR»/django/core/management/__init__.py", line 343, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/«PKGBUILDDIR»/django/core/management/base.py", line 394, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/«PKGBUILDDIR»/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/«PKGBUILDDIR»/django/core/management/commands/startproject.py", line 33, in handle
    super(Command, self).handle('project', project_name, target, **options)
  File "/«PKGBUILDDIR»/django/core/management/templates.py", line 116, in handle
    base_subdir)
  File "/«PKGBUILDDIR»/django/core/management/templates.py", line 199, in handle_template
    return self.extract(absolute_path)
  File "/«PKGBUILDDIR»/django/core/management/templates.py", line 293, in extract
    archive.extract(filename, tempdir)
  File "/«PKGBUILDDIR»/django/utils/archive.py", line 49, in extract
    with Archive(path) as archive:
  File "/«PKGBUILDDIR»/django/utils/archive.py", line 58, in __init__
    self._archive = self._archive_cls(file)(file)
  File "/«PKGBUILDDIR»/django/utils/archive.py", line 138, in __init__
    self._archive = tarfile.open(file)
  File "/usr/lib/python2.7/tarfile.py", line 1678, in open
    raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully
'

----------------------------------------------------------------------
Ran 9349 tests in 204.537s

FAILED (failures=2, skipped=547, expected failures=8)
  Applying sites_framework.0001_initial... OK


-- 
Brian May <bam at debian.org>



More information about the Python-modules-team mailing list