To see the `order_with_respect_to` warnings, you must also include
`contenttypes_tests` (these apps share models):
`$ python -Wall runtests.py order_with_respect_to contenttypes_tests`
Example:
{{{
/home/tim/code/django/django/db/models/base.py:283: RuntimeWarning: Model
'order_with_respect_to.bar' was already registered. Reloading models is
not advised as it can lead to inconsistencies, most notably with related
models.
}}}
We should probably promote `RuntimeWarning` to "error" in
`tests/runtests.py` to prevent future regressions.
--
Ticket URL: <https://code.djangoproject.com/ticket/25745>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by charettes):
I wonder if the `order_with_respect_to` and `foreign_object` issues are
fixed by the following commits:
https://github.com/charettes/django/commit/836c19a2b64e8324fa792104fddb434e29be125c
https://github.com/charettes/django/commit/8eb98a0809229e635d1603c19314ac4c383d9ead
which are part of this [https://github.com/django/django/pull/5613/commits
PR].
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:1>
Comment (by charettes):
I confirm that the issues are fixed by the proposed commits.
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:2>
Comment (by charettes):
The `schema` tests will need a bit of adjustment to avoid registering the
`LocalTagThrough` model multiple time to the same `apps` instance (see
`SchemaTests._test_m2m_create_through`).
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:3>
Comment (by charettes):
Tim what do you think of closing this ticket in favor of #25746?
Maybe we should reuse this one for the sole purpose of promoting
`RuntimeError` to errors?
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:4>
Comment (by timgraham):
I'd appreciate (perhaps simpler) patches we could backport to 1.9
(foreign_object and schema) and 1.8 (schema).
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:5>
* status: new => assigned
* owner: nobody => charettes
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:6>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/5652 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:7>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:8>
Comment (by Simon Charette <charette.s@…>):
In [changeset:"d95b22bd56764c71047ec16f628c00c0fd997cfd" d95b22b]:
{{{
#!CommitTicketReference repository=""
revision="d95b22bd56764c71047ec16f628c00c0fd997cfd"
Refs #25745 -- Isolated some postgres array field check tests.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:12>
Comment (by Simon Charette <charette.s@…>):
In [changeset:"406de4c243e3618c13c36c23e07a4aa33162b344" 406de4c]:
{{{
#!CommitTicketReference repository=""
revision="406de4c243e3618c13c36c23e07a4aa33162b344"
Refs #25745 -- Isolated an order_with_respect_to test.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:9>
Comment (by Simon Charette <charette.s@…>):
In [changeset:"2eefbca1a4140d8a8174a06a1f0160fcc76d8f64" 2eefbca]:
{{{
#!CommitTicketReference repository=""
revision="2eefbca1a4140d8a8174a06a1f0160fcc76d8f64"
Refs #25745 -- Isolated a foreign_object test.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:10>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"1c5f4e86bc9c7bae5d5f3830d9cfbb0043297261" 1c5f4e86]:
{{{
#!CommitTicketReference repository=""
revision="1c5f4e86bc9c7bae5d5f3830d9cfbb0043297261"
Fixed #25745 -- Promoted RuntimeWarnings to errors in the test suite.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:13>
Comment (by Simon Charette <charette.s@…>):
In [changeset:"64240263f22055cb539159e9359e64d5096f39d9" 64240263]:
{{{
#!CommitTicketReference repository=""
revision="64240263f22055cb539159e9359e64d5096f39d9"
Refs #25745 -- Avoided multiple registration of the same model in schema
tests.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:11>
Comment (by Simon Charette <charette.s@…>):
In [changeset:"ef78aec222a7450b56088d9ea9837867c9d9698c" ef78aec2]:
{{{
#!CommitTicketReference repository=""
revision="ef78aec222a7450b56088d9ea9837867c9d9698c"
[1.9.x] Fixed #25745 -- Promoted RuntimeWarnings to errors in the test
suite.
Backport of 1c5f4e86bc9c7bae5d5f3830d9cfbb0043297261 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:18>
Comment (by Simon Charette <charette.s@…>):
In [changeset:"cfa3d4a2564c13d581d2d9f344c17d819e665fb6" cfa3d4a2]:
{{{
#!CommitTicketReference repository=""
revision="cfa3d4a2564c13d581d2d9f344c17d819e665fb6"
[1.9.x] Refs #25745 -- Isolated some postgres array field check tests.
Backport of d95b22bd56764c71047ec16f628c00c0fd997cfd from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:17>
Comment (by Simon Charette <charette.s@…>):
In [changeset:"fb016e6c55b34c9d39e7456e7005422a5af48e0a" fb016e6]:
{{{
#!CommitTicketReference repository=""
revision="fb016e6c55b34c9d39e7456e7005422a5af48e0a"
[1.9.x] Refs #25745 -- Isolated a foreign_object test.
Backport of 2eefbca1a4140d8a8174a06a1f0160fcc76d8f64 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:15>
Comment (by Simon Charette <charette.s@…>):
In [changeset:"e8512811cd56d1be9280a81c6041654779f3eefd" e8512811]:
{{{
#!CommitTicketReference repository=""
revision="e8512811cd56d1be9280a81c6041654779f3eefd"
[1.9.x] Refs #25745 -- Isolated an order_with_respect_to test.
Backport of 406de4c243e3618c13c36c23e07a4aa33162b344 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:14>
Comment (by Simon Charette <charette.s@…>):
In [changeset:"77e579087e820b25fe038234b030ad74783d1750" 77e5790]:
{{{
#!CommitTicketReference repository=""
revision="77e579087e820b25fe038234b030ad74783d1750"
[1.9.x] Refs #25745 -- Avoided multiple registration of the same model in
schema tests.
Backport of 64240263f22055cb539159e9359e64d5096f39d9 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:16>
Comment (by Simon Charette <charette.s@…>):
In [changeset:"afe84c71ebddfe295ed33105f38f3be7ea3f2fb0" afe84c71]:
{{{
#!CommitTicketReference repository=""
revision="afe84c71ebddfe295ed33105f38f3be7ea3f2fb0"
[1.8.x] Refs #25745 -- Avoided multiple registration of the same model in
schema tests.
Conflicts:
tests/schema/tests.py
Backport of 64240263f22055cb539159e9359e64d5096f39d9 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:19>
Comment (by Simon Charette <charette.s@…>):
In [changeset:"5a6a5ce0d56b9e307c74a55ed1239aad07841ab9" 5a6a5ce0]:
{{{
#!CommitTicketReference repository=""
revision="5a6a5ce0d56b9e307c74a55ed1239aad07841ab9"
[1.8.x] Fixed #25745 -- Promoted RuntimeWarnings to errors in the test
suite.
Conflicts:
tests/apps/tests.py
tests/migrations/test_graph.py
tests/queryset_pickle/tests.py
tests/runtests.py
Backport of 1c5f4e86bc9c7bae5d5f3830d9cfbb0043297261 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25745#comment:20>