[Python-modules-team] Bug#933146: FTBFS, not Django 2.2 ready

Thomas Goirand zigo at debian.org
Fri Jul 26 22:46:36 BST 2019


Package: python-django-rosetta
Version: 0.7.6-1
Severity: serious
Tags: patch

Hi,

Please find attached patch for the Python 2 removal part.
The package still FTBFS after this patch:

   dh_auto_test -O--buildsystem=pybuild
I: pybuild base:217: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_django-rosetta/build; python3.7 -m unittest discover -v 
rosetta.tests (unittest.loader._FailedTest) ... ERROR

======================================================================
ERROR: rosetta.tests (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: rosetta.tests
Traceback (most recent call last):
  File "/usr/lib/python3.7/unittest/loader.py", line 470, in _find_test_path
    package = self._get_module_from_name(name)
  File "/usr/lib/python3.7/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_django-rosetta/build/rosetta/tests/__init__.py", line 1, in <module>
    from .tests import *
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_django-rosetta/build/rosetta/tests/tests.py", line 3, in <module>
    from django.contrib.auth.models import User, Group
  File "/usr/lib/python3/dist-packages/django/contrib/auth/models.py", line 2, in <module>
    from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
  File "/usr/lib/python3/dist-packages/django/contrib/auth/base_user.py", line 47, in <module>
    class AbstractBaseUser(models.Model):
  File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 103, in __new__
    app_config = apps.get_containing_app_config(module)
  File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 252, in get_containing_app_config
    self.check_apps_ready()
  File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 134, in check_apps_ready
    settings.INSTALLED_APPS
  File "/usr/lib/python3/dist-packages/django/conf/__init__.py", line 79, in __getattr__
    self._setup(name)
  File "/usr/lib/python3/dist-packages/django/conf/__init__.py", line 64, in _setup
    % (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.


----------------------------------------------------------------------
Ran 1 test in 0.000s

FAILED (errors=1)
E: pybuild pybuild:341: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_django-rosetta/build; python3.7 -m unittest discover -v 
dh_auto_test: pybuild --test -i python{version} -p 3.7 returned exit code 13
make: *** [debian/rules:10: build] Error 255
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2019-07-26T21:43:50Z
-------------- next part --------------
diff -u -N -r debian/changelog ../debian/changelog
--- debian/changelog	2019-07-26 23:44:33.561224883 +0200
+++ ../debian/changelog	2019-07-26 23:43:01.840631647 +0200
@@ -1,4 +1,4 @@
-python-django-rosetta (0.7.6-1) UNRELEASED; urgency=medium
+python-django-rosetta (0.7.6-1) unstable; urgency=medium
 
   [ Michael Fladischer ]
   * New upstream release.
@@ -24,7 +24,14 @@
   * d/watch: Use https protocol
   * Convert git repository from git-dpm to gbp layout
 
- -- Michael Fladischer <fladi at debian.org>  Tue, 04 Aug 2015 09:47:58 +0200
+  [ Thomas Goirand ]
+  * Team upload.
+  * Ran wrap-and-sort -bast.
+  * Switch to debhelper-compat=11.
+  * Removed Python 2 support.
+  * Add missing build-depends: python3-django, python3-polib.
+
+ -- Thomas Goirand <zigo at debian.org>  Fri, 26 Jul 2019 23:35:51 +0200
 
 python-django-rosetta (0.7.2-1) unstable; urgency=low
 
diff -u -N -r debian/compat ../debian/compat
--- debian/compat	2019-07-26 23:44:33.561224883 +0200
+++ ../debian/compat	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-7
diff -u -N -r debian/control ../debian/control
--- debian/control	2019-07-26 23:44:33.561224883 +0200
+++ ../debian/control	2019-07-26 23:42:33.088444857 +0200
@@ -1,50 +1,29 @@
 Source: python-django-rosetta
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
-Uploaders: Michael Ziegler <diese-addy at funzt-halt.net>
+Uploaders:
+ Michael Ziegler <diese-addy at funzt-halt.net>,
 Section: python
 Priority: optional
-Build-Depends: debhelper (>= 7.0.50~),
-               dh-python,
-               python,
-               python-setuptools,
-               python3-all,
-               python3-setuptools
+Build-Depends:
+ debhelper-compat (= 11),
+ dh-python,
+ python3-all,
+ python3-django,
+ python3-polib,
+ python3-setuptools,
 Standards-Version: 3.9.6
 Vcs-Browser: https://salsa.debian.org/python-team/modules/python-django-rosetta
 Vcs-Git: https://salsa.debian.org/python-team/modules/python-django-rosetta.git
 Homepage: http://code.google.com/p/django-rosetta
 XS-Python-Version: all
 
-Package: python-django-rosetta
-Architecture: all
-Depends: python-django,
-         python-polib (>= 1.0.3),
-         ${misc:Depends},
-         ${python:Depends}
-Description: Eases the translation process of your Django projects (Python 2)
- A Django application that eases the translation process of your Django
- projects.
- .
- Because it doesn't export any models, Rosetta doesn't create any tables
- in your project's database. Rosetta can be installed and uninstalled by
- simply adding and removing a single entry in your project's INSTALLED_APPS
- and a single line in your main urls.py file.
- .
- Features:
-  * Database independent
-  * Reads and writes your project's gettext catalogs (po and mo files)
-  * Installed and uninstalled in under a minute
-  * Uses Django's admin interface CSS
-  * Translation suggestions via Google AJAX Language API
- .
- Acknowledgments:
-  * Rosetta uses the excellent polib library to parse and handle Po files.
- .
-  This is the Python 2 version of the package.
-
 Package: python3-django-rosetta
 Architecture: all
-Depends: python3-django, python3-polib, ${misc:Depends}, ${python3:Depends}
+Depends:
+ python3-django,
+ python3-polib,
+ ${misc:Depends},
+ ${python3:Depends},
 Description: Eases the translation process of your Django projects (Python 3)
  A Django application that eases the translation process of your Django
  projects.
diff -u -N -r debian/rules ../debian/rules
--- debian/rules	2019-07-26 23:44:33.561224883 +0200
+++ ../debian/rules	2019-07-26 23:40:03.083462860 +0200
@@ -7,4 +7,4 @@
 export PYBUILD_NAME=django-rosetta
 
 %:
-	dh $@ --with python2,python3 --buildsystem=pybuild
+	dh $@ --with python3 --buildsystem=pybuild


More information about the Python-modules-team mailing list