[Django] #23469: django_1_6_0 compatibility check yields false posititves

10 views
Skip to first unread message

Django

unread,
Sep 11, 2014, 7:56:11 AM9/11/14
to django-...@googlegroups.com
#23469: django_1_6_0 compatibility check yields false posititves
--------------------------------------+--------------------
Reporter: brutasse | Owner: nobody
Type: Bug | Status: new
Component: Core (System checks) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
[https://github.com/django/django/blob/master/django/core/checks/compatibility/django_1_6_0.py#L42-L88
This piece of code] attempts to decide whether to show a warning for the
updated test runner in Django 1.6.

However the checks performed have very little to do with the tests layout.
Let's say I have a project that:

* Uses `contrib.sites` (+2 points)
* Uses the cached template loader by default (+2 points)
* Sets `MANAGERS` and `ADMINS` (+3 points)

Then Django will happily raise a `1_6.W001` warning whether my project has
an issue with tests or not.

It seems to me that this check is too weak, being based on orthogonal
project properties and on settings that are rather likely to be
overridden.

Unfortunately I don't have any idea for a robust alternative, so my only
suggestion would be to remove this check…

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

Django

unread,
Sep 11, 2014, 8:11:06 AM9/11/14
to django-...@googlegroups.com
#23469: django_1_6_0 compatibility check yields false posititves
--------------------------------------+------------------------------------
Reporter: brutasse | Owner: nobody
Type: Cleanup/optimization | Status: new

Component: Core (System checks) | Version: master
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
--------------------------------------+------------------------------------
Changes (by claudep):

* needs_better_patch: => 0
* needs_docs: => 0
* type: Bug => Cleanup/optimization
* needs_tests: => 0
* stage: Unreviewed => Accepted


Comment:

Have been (moderately) bitten by this, too.

--
Ticket URL: <https://code.djangoproject.com/ticket/23469#comment:1>

Django

unread,
Sep 11, 2014, 9:13:32 AM9/11/14
to django-...@googlegroups.com
#23469: django_1_6_0 compatibility check yields false posititves
--------------------------------------+------------------------------------
Reporter: brutasse | Owner: nobody
Type: Cleanup/optimization | Status: new

Component: Core (System checks) | Version: master
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
--------------------------------------+------------------------------------

Comment (by timgraham):

Duplicate of #21197, but I'd say we should be able to remove compatibility
checks after they've been in one or two versions of Django. We'd only need
to keep them around if we expect people will be skipping version of Django
when upgrading. I don't think we should really support/recommend that, but
I'm afraid it will happen frequently now that we've added LTS. Thoughts on
that?

--
Ticket URL: <https://code.djangoproject.com/ticket/23469#comment:2>

Django

unread,
Sep 11, 2014, 11:07:56 AM9/11/14
to django-...@googlegroups.com
#23469: django_1_6_0 compatibility check yields false posititves
--------------------------------------+------------------------------------
Reporter: brutasse | Owner: nobody
Type: Cleanup/optimization | Status: new

Component: Core (System checks) | Version: master
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
--------------------------------------+------------------------------------

Comment (by collinanderson):

or could we have a check --lts flag or --all or something that runs more
than just the last version, but only run the last version or two by
default?

--
Ticket URL: <https://code.djangoproject.com/ticket/23469#comment:3>

Django

unread,
Sep 11, 2014, 11:12:27 AM9/11/14
to django-...@googlegroups.com
#23469: django_1_6_0 compatibility check yields false posititves
--------------------------------------+------------------------------------
Reporter: brutasse | Owner: nobody
Type: Cleanup/optimization | Status: new

Component: Core (System checks) | Version: master
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
--------------------------------------+------------------------------------

Comment (by carljm):

We haven't made any changes to our deprecation process to account for LTS,
so I don't think we can really support skipping from LTS to LTS; you'd
miss entire deprecations without ever seeing any warnings. So I think when
the next LTS comes out, we just need to be very clear in its release notes
that upgrading direct from LTS to LTS is not supported, you need to go
major version by major version.

I don't think there's any urgency about removing old upgrade checks in
general, if they don't have false positives, but I'm definitely in favor
of removing this particular problematic check from master (and maybe even
1.7.X) at this point.

--
Ticket URL: <https://code.djangoproject.com/ticket/23469#comment:4>

Django

unread,
Oct 17, 2014, 10:34:51 AM10/17/14
to django-...@googlegroups.com
#23469: django_1_6_0 compatibility check yields false posititves
--------------------------------------+------------------------------------
Reporter: brutasse | Owner: nobody
Type: Cleanup/optimization | Status: closed

Component: Core (System checks) | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"7ae03204ac207bee78d668952744da853a3a732b"]:
{{{
#!CommitTicketReference repository=""
revision="7ae03204ac207bee78d668952744da853a3a732b"
Fixed #23469 -- Removed test runner compatibility check which often
yielded false positives.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23469#comment:5>

Reply all
Reply to author
Forward
0 new messages