rob-metalinkage / django-rdf-io

Simple RDF serialiser/deserialiser to support synching a django model with an external triple-store
Creative Commons Zero v1.0 Universal
37 stars 14 forks source link

compatiblity issue with django 3.0.5 #19

Closed markdoerr closed 4 years ago

markdoerr commented 4 years ago

Hello Rob, running your unittests with pytest under python 3.8 with django 3.0.5 results in the exception django.core.exceptions.AppRegistryNotReady. You tried to fix this by adjusting the signalling, but the error still remains. Do you have an idea, why ?

Here is the full output of the tests:

`==================================================================================================================== test session starts ===================================================================================================================== platform linux -- Python 3.8.0, pytest-5.4.1, py-1.8.1, pluggy-0.13.1 rootdir: /lair/source/collection/python/django/django-rdf-io plugins: mock-3.1.0 collected 0 items / 2 errors

=========================================================================================================================== ERRORS =========================================================================================================================== _ ERROR collecting rdf_io/tests/testmappings.py tests/test_mappings.py:1: in from rdf_io.models import models.py:18: in from django.contrib.contenttypes.fields import GenericForeignKey /home/mark/py3venv/lara/lib/python3.8/site-packages/django/contrib/contenttypes/fields.py:3: in from django.contrib.contenttypes.models import ContentType /home/mark/py3venv/lara/lib/python3.8/site-packages/django/contrib/contenttypes/models.py:134: in class ContentType(models.Model): /home/mark/py3venv/lara/lib/python3.8/site-packages/django/db/models/base.py:87: in new app_config = apps.get_containing_app_config(module) /home/mark/py3venv/lara/lib/python3.8/site-packages/django/apps/registry.py:249: in get_containing_app_config self.check_apps_ready() /home/mark/py3venv/lara/lib/python3.8/site-packages/django/apps/registry.py:132: in check_apps_ready raise AppRegistryNotReady("Apps aren't loaded yet.") E django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. ___ ERROR collecting rdf_io/tests/test_viewspy.py ____ tests/test_viewspy.py:1: in from rdf_io.views import views/init.py:1: in from .serialize import views/serialize.py:3: in from rdf_io.models import models.py:18: in from django.contrib.contenttypes.fields import GenericForeignKey /home/mark/py3venv/lara/lib/python3.8/site-packages/django/contrib/contenttypes/fields.py:3: in from django.contrib.contenttypes.models import ContentType /home/mark/py3venv/lara/lib/python3.8/site-packages/django/contrib/contenttypes/models.py:134: in class ContentType(models.Model): /home/mark/py3venv/lara/lib/python3.8/site-packages/django/db/models/base.py:87: in new app_config = apps.get_containing_app_config(module) /home/mark/py3venv/lara/lib/python3.8/site-packages/django/apps/registry.py:249: in get_containing_app_config self.check_apps_ready() /home/mark/py3venv/lara/lib/python3.8/site-packages/django/apps/registry.py:132: in check_apps_ready raise AppRegistryNotReady("Apps aren't loaded yet.") E django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. ================================================================================================================== short test summary info =================================================================================================================== ERROR tests/test_mappings.py - django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. ERROR tests/test_viewspy.py - django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ===================================================================================================================== 2 errors in 0.37s ====================================================================================================================== `

rob-metalinkage commented 4 years ago

Unit tests run fine in pyhton 3.8 and django 1.11 - so its a django version update issue..

rob-metalinkage commented 4 years ago

commit should fix this.