#24812: RuntimeWarning in schema tests about reloading models
----------------------------+------------------------------------
     Reporter:  timgraham   |                    Owner:  nobody
         Type:  Bug         |                   Status:  new
    Component:  Migrations  |                  Version:  1.8
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+------------------------------------
Description changed by timgraham:

Old description:

> Warning should be fixed or silenced.
> {{{
> $ python -Wall runtests.py schema
>
> /home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model
> 'localbookwithm2m_tags.schema' was already registered. Reloading models
> is not advised as it can lead to inconsistencies, most notably with
> related models.
>   new_class._meta.apps.register_model(new_class._meta.app_label,
> new_class)
> ./home/tim/code/django/django/db/models/base.py:279: RuntimeWarning:
> Model 'localbookwithm2m_tags.schema' was already registered. Reloading
> models is not advised as it can lead to inconsistencies, most notably
> with related models.
>   new_class._meta.apps.register_model(new_class._meta.app_label,
> new_class)
> ..../home/tim/code/django/django/db/models/base.py:279: RuntimeWarning:
> Model 'localauthorwithm2m_tags.schema' was already registered. Reloading
> models is not advised as it can lead to inconsistencies, most notably
> with related models.
>   new_class._meta.apps.register_model(new_class._meta.app_label,
> new_class)
> .sss/home/tim/code/django/django/db/models/base.py:279: RuntimeWarning:
> Model 'localauthorwithm2m_tags.schema' was already registered. Reloading
> models is not advised as it can lead to inconsistencies, most notably
> with related models.
>   new_class._meta.apps.register_model(new_class._meta.app_label,
> new_class)
> ./home/tim/code/django/django/db/models/base.py:279: RuntimeWarning:
> Model 'localbookwithm2m_tags.schema' was already registered. Reloading
> models is not advised as it can lead to inconsistencies, most notably
> with related models.
>   new_class._meta.apps.register_model(new_class._meta.app_label,
> new_class)
> ./home/tim/code/django/django/db/models/base.py:279: RuntimeWarning:
> Model 'localbookwithm2m_tags.schema' was already registered. Reloading
> models is not advised as it can lead to inconsistencies, most notably
> with related models.
>   new_class._meta.apps.register_model(new_class._meta.app_label,
> new_class)
> /home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model
> 'localbookwithm2m_uniques.schema' was already registered. Reloading
> models is not advised as it can lead to inconsistencies, most notably
> with related models.
>   new_class._meta.apps.register_model(new_class._meta.app_label,
> new_class)
> ./home/tim/code/django/django/db/models/base.py:279: RuntimeWarning:
> Model 'localbookwithm2m_tags.schema' was already registered. Reloading
> models is not advised as it can lead to inconsistencies, most notably
> with related models.
>   new_class._meta.apps.register_model(new_class._meta.app_label,
> new_class)
> /home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model
> 'localbookwithm2m_uniques.schema' was already registered. Reloading
> models is not advised as it can lead to inconsistencies, most notably
> with related models.
>   new_class._meta.apps.register_model(new_class._meta.app_label,
> new_class)
> }}}
> There is also one warning on the stable/1.7.x branch.

New description:

 Warning should be fixed or silenced.
 {{{
 $ python -Wall runtests.py schema

 /home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model
 'localbookwithm2m_tags.schema' was already registered. Reloading models is
 not advised as it can lead to inconsistencies, most notably with related
 models.
   new_class._meta.apps.register_model(new_class._meta.app_label,
 new_class)
 ./home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model
 'localbookwithm2m_tags.schema' was already registered. Reloading models is
 not advised as it can lead to inconsistencies, most notably with related
 models.
   new_class._meta.apps.register_model(new_class._meta.app_label,
 new_class)
 ..../home/tim/code/django/django/db/models/base.py:279: RuntimeWarning:
 Model 'localauthorwithm2m_tags.schema' was already registered. Reloading
 models is not advised as it can lead to inconsistencies, most notably with
 related models.
   new_class._meta.apps.register_model(new_class._meta.app_label,
 new_class)
 .sss/home/tim/code/django/django/db/models/base.py:279: RuntimeWarning:
 Model 'localauthorwithm2m_tags.schema' was already registered. Reloading
 models is not advised as it can lead to inconsistencies, most notably with
 related models.
   new_class._meta.apps.register_model(new_class._meta.app_label,
 new_class)
 ./home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model
 'localbookwithm2m_tags.schema' was already registered. Reloading models is
 not advised as it can lead to inconsistencies, most notably with related
 models.
   new_class._meta.apps.register_model(new_class._meta.app_label,
 new_class)
 ./home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model
 'localbookwithm2m_tags.schema' was already registered. Reloading models is
 not advised as it can lead to inconsistencies, most notably with related
 models.
   new_class._meta.apps.register_model(new_class._meta.app_label,
 new_class)
 /home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model
 'localbookwithm2m_uniques.schema' was already registered. Reloading models
 is not advised as it can lead to inconsistencies, most notably with
 related models.
   new_class._meta.apps.register_model(new_class._meta.app_label,
 new_class)
 ./home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model
 'localbookwithm2m_tags.schema' was already registered. Reloading models is
 not advised as it can lead to inconsistencies, most notably with related
 models.
   new_class._meta.apps.register_model(new_class._meta.app_label,
 new_class)
 /home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model
 'localbookwithm2m_uniques.schema' was already registered. Reloading models
 is not advised as it can lead to inconsistencies, most notably with
 related models.
   new_class._meta.apps.register_model(new_class._meta.app_label,
 new_class)
 }}}
 There is also one warning on the stable/1.7.x branch.

 Also:
 {{{
 $ python -Wall runtests.py migrations.test_state
 /home/tim/code/django/tests/migrations/test_state.py:450: RuntimeWarning:
 Model 'a.something' was already registered. Reloading models is not
 advised as it can lead to inconsistencies, most notably with related
 models.
   class A(models.Model):
 /home/tim/code/django/tests/migrations/test_state.py:454: RuntimeWarning:
 Model 'b.something' was already registered. Reloading models is not
 advised as it can lead to inconsistencies, most notably with related
 models.
   class B(models.Model):
 ....../home/tim/code/django/tests/migrations/test_state.py:497:
 RuntimeWarning: Model 'a.something' was already registered. Reloading
 models is not advised as it can lead to inconsistencies, most notably with
 related models.
   class A(models.Model):
 }}}

--

--
Ticket URL: <https://code.djangoproject.com/ticket/24812#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.418d97e82ce1ef30be08cc502ca43bd7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to