[Pkg-linaro-lava-devel] Bug#997626: django-restricted-resource: FTBFS: TypeError: Abstract models cannot be instantiated.

Lucas Nussbaum lucas at debian.org
Sat Oct 23 22:08:28 BST 2021


Source: django-restricted-resource
Version: 2016.8-3
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
User: lucas at debian.org
Usertags: ftbfs-20211023 ftbfs-bookworm

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
> make[1]: Entering directory '/<<PKGBUILDDIR>>'
> # Run the bundled tests (in-memory database) when building the package
> LC_ALL=C python3 ./django_restricted_resource/test_project/manage.py test
> Creating test database for alias 'default'...
> System check identified some issues:
> 
> WARNINGS:
> django_restricted_resource.ExampleRestrictedResource: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
> 	HINT: Configure the DEFAULT_AUTO_FIELD setting or the AppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
> 
> System check identified 1 issue (0 silenced).
> .........................................................................................................EEEE...............................................................
> ======================================================================
> ERROR: test_clean_is_okay_when_just_group_set (django_restricted_resource.tests.ResourceCleanTests)
> test_clean_is_okay_when_just_group_set (django_restricted_resource.tests.ResourceCleanTests)
> ----------------------------------------------------------------------
> testtools.testresult.real._StringException: Traceback (most recent call last):
>   File "/<<PKGBUILDDIR>>/django_restricted_resource/test_project/../../django_restricted_resource/tests.py", line 64, in test_clean_is_okay_when_just_group_set
>     resource = RestrictedResource(group=group)
>   File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 413, in __init__
>     raise TypeError('Abstract models cannot be instantiated.')
> TypeError: Abstract models cannot be instantiated.
> 
> 
> ======================================================================
> ERROR: test_clean_is_okay_when_just_user_set (django_restricted_resource.tests.ResourceCleanTests)
> test_clean_is_okay_when_just_user_set (django_restricted_resource.tests.ResourceCleanTests)
> ----------------------------------------------------------------------
> testtools.testresult.real._StringException: Traceback (most recent call last):
>   File "/<<PKGBUILDDIR>>/django_restricted_resource/test_project/../../django_restricted_resource/tests.py", line 59, in test_clean_is_okay_when_just_user_set
>     resource = RestrictedResource(user=user)
>   File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 413, in __init__
>     raise TypeError('Abstract models cannot be instantiated.')
> TypeError: Abstract models cannot be instantiated.
> 
> 
> ======================================================================
> ERROR: test_clean_raises_exception_when_both_user_and_group_is_set (django_restricted_resource.tests.ResourceCleanTests)
> test_clean_raises_exception_when_both_user_and_group_is_set (django_restricted_resource.tests.ResourceCleanTests)
> ----------------------------------------------------------------------
> testtools.testresult.real._StringException: Traceback (most recent call last):
>   File "/<<PKGBUILDDIR>>/django_restricted_resource/test_project/../../django_restricted_resource/tests.py", line 54, in test_clean_raises_exception_when_both_user_and_group_is_set
>     resource = RestrictedResource(user=user, group=group)
>   File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 413, in __init__
>     raise TypeError('Abstract models cannot be instantiated.')
> TypeError: Abstract models cannot be instantiated.
> 
> 
> ======================================================================
> ERROR: test_clean_raises_exception_when_owner_is_not_set (django_restricted_resource.tests.ResourceCleanTests)
> test_clean_raises_exception_when_owner_is_not_set (django_restricted_resource.tests.ResourceCleanTests)
> ----------------------------------------------------------------------
> testtools.testresult.real._StringException: Traceback (most recent call last):
>   File "/<<PKGBUILDDIR>>/django_restricted_resource/test_project/../../django_restricted_resource/tests.py", line 48, in test_clean_raises_exception_when_owner_is_not_set
>     resource = RestrictedResource()
>   File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 413, in __init__
>     raise TypeError('Abstract models cannot be instantiated.')
> TypeError: Abstract models cannot be instantiated.
> 
> 
> ----------------------------------------------------------------------
> Ran 172 tests in 1.637s
> 
> FAILED (errors=4)
> Destroying test database for alias 'default'...
> make[1]: *** [debian/rules:9: override_dh_auto_test] Error 1


The full build log is available from:
http://qa-logs.debian.net/2021/10/23/django-restricted-resource_2016.8-3_unstable.log

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

If you reassign this bug to another package, please marking it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.



More information about the Pkg-linaro-lava-devel mailing list