[Python-modules-team] Bug#834667: django-modeltranslation: FTBFS in testing (type object 'TestModel' has no attribute '_deferred')
Santiago Vila
sanvila at debian.org
Wed Aug 17 22:20:57 UTC 2016
Package: src:django-modeltranslation
Version: 0.11-1
Severity: serious
Dear maintainer:
I tried to build this package with "dpkg-buildpackage -A"
(which is what the "Arch: all" autobuilder would do to build it)
but it failed:
--------------------------------------------------------------------------------
[...]
debian/rules build-indep
dh build-indep --with python2,python3,sphinxdoc --buildsystem=pybuild
dh_testdir -i -O--buildsystem=pybuild
dh_update_autotools_config -i -O--buildsystem=pybuild
dh_auto_configure -i -O--buildsystem=pybuild
I: pybuild base:184: python2.7 setup.py config
running config
I: pybuild base:184: python3.5 setup.py config
running config
debian/rules override_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_auto_build
I: pybuild base:184: /usr/bin/python setup.py build
[... snipped ...]
======================================================================
ERROR: setUpClass (modeltranslation.tests.tests.ModeltranslationTransactionTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/modeltranslation/tests/tests.py", line 114, in setUpClass
super(ModeltranslationTransactionTestBase, cls).setUpClass()
File "/usr/lib/python3/dist-packages/django/test/testcases.py", line 172, in setUpClass
cls._cls_overridden_context.enable()
File "/usr/lib/python3/dist-packages/django/test/utils.py", line 235, in enable
apps.set_installed_apps(self.options['INSTALLED_APPS'])
File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 340, in set_installed_apps
self.populate(installed)
File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 115, in populate
app_config.ready()
File "/<<PKGBUILDDIR>>/modeltranslation/apps.py", line 11, in ready
handle_translation_registrations()
File "/<<PKGBUILDDIR>>/modeltranslation/models.py", line 81, in handle_translation_registrations
autodiscover()
File "/<<PKGBUILDDIR>>/modeltranslation/models.py", line 32, in autodiscover
import_module(module)
File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 673, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/<<PKGBUILDDIR>>/modeltranslation/tests/translation.py", line 18, in <module>
translator.register(TestModel, TestTranslationOptions)
File "/<<PKGBUILDDIR>>/modeltranslation/translator.py", line 427, in register
opts = self._get_options_for_model(model, opts_class, **options)
File "/<<PKGBUILDDIR>>/modeltranslation/translator.py", line 547, in _get_options_for_model
if model._deferred:
AttributeError: type object 'TestModel' has no attribute '_deferred'
----------------------------------------------------------------------
Ran 0 tests in 0.050s
FAILED (errors=22)
OK
Destroying test database for alias 'default' ('file:memorydb_default?mode=memory&cache=shared')...
debian/rules:13: recipe for target 'override_dh_auto_test' failed
make[1]: *** [override_dh_auto_test] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
debian/rules:6: recipe for target 'build-indep' failed
make: *** [build-indep] Error 2
dpkg-buildpackage: error: debian/rules build-indep gave error exit status 2
--------------------------------------------------------------------------------
Because this source package only generates "Arch: all" packages, this
is the same as a FTBFS bug in the usual sense and the fact that I was
using "dpkg-buildpackage -A" is quite irrelevant.
For this particular package, I've also checked that it fails to build
from source in the reproducible builds site:
https://tests.reproducible-builds.org/
Thanks.
More information about the Python-modules-team
mailing list