Thursday, March 3, 2016

Re: Problem Django.19 upgrade and circular imports

No ideas off the top of my head. You could try bisecting to find the commit in Django where the behavior changed.

https://docs.djangoproject.com/en/dev/internals/contributing/triaging-tickets/#bisecting-a-regression

On Thursday, March 3, 2016 at 6:29:38 PM UTC-5, Andres Osinski wrote:
Hi everyone! I'm having an issue with circular imports in Django 1.9 that I have not seen in my app, which had been running 1.7 before.

I have a Django app in apps.common, which has its associated apps.common.models too. No imports on __init__.py or anything of the sort.
When I my app in apps.account.models attempts to import apps.common.models, it complains that said module does not exist.

Putting a pdb set_trace() call at the top of apps.common.models and apps.account.models shows that the former executes *before* apps.account.models, so I fail to see how this could result in the posted error.

For the record, both apps use the new AppConfig scheme in their corresponding apps.py file, and the import order in INSTALLED_APPS is:

'apps.common.CommonConfig',
'apps.account.AccountConfig',
...

Has anyone else had a similar issue in this upgrade? Is there anything I can do to diagnose the source of this?

Thanks!

--
Andrés Osinski

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/44f5f6e6-771b-4ec2-8b29-91da0cc737cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment