[Django] #22526: New check method on models not documented in release notes

14 views
Skip to first unread message

Django

unread,
Apr 26, 2014, 9:27:10 PM4/26/14
to django-...@googlegroups.com
#22526: New check method on models not documented in release notes
-------------------------------+------------------------
Reporter: kevin-brown | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.7-beta-2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------
Django 1.7 adds a new `check` command for models that is called on the
class. As far as I can tell, this is only mentioned (briefly) in the
documentation for the check framework.

https://docs.djangoproject.com/en/1.7/topics/checks/#field-model-and-
manager-checks

If users create a model that has a method `check`, calling `manage.py
check` will fail (because of the conflicting method names).

{{{
Traceback (most recent call last):
File "manage.py", line 12, in <module>
execute_from_command_line(sys.argv)
File "/home/<>/.virtualenvs/<>/local/lib/python2.7/site-
packages/django/core/management/__init__.py", line 427, in
execute_from_command_line
utility.execute()
File "/home/<>/.virtualenvs/<>/local/lib/python2.7/site-
packages/django/core/management/__init__.py", line 419, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/<>/.virtualenvs/<>/local/lib/python2.7/site-
packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/<>/.virtualenvs/<>/local/lib/python2.7/site-
packages/django/core/management/base.py", line 337, in execute
output = self.handle(*args, **options)
File "/home/<>/.virtualenvs/<>/local/lib/python2.7/site-
packages/django/core/management/commands/check.py", line 39, in handle
self.check(app_configs=app_configs, tags=tags,
display_num_errors=True)
File "/home/<>/.virtualenvs/<>/local/lib/python2.7/site-
packages/django/core/management/base.py", line 370, in check
all_issues = checks.run_checks(app_configs=app_configs, tags=tags)
File "/home/<>/.virtualenvs/<>/local/lib/python2.7/site-
packages/django/core/checks/registry.py", line 59, in run_checks
new_errors = check(app_configs=app_configs)
File "/home/<>/.virtualenvs/<>/local/lib/python2.7/site-
packages/django/core/checks/model_checks.py", line 16, in check_all_models
if app_configs is None or model._meta.app_config in app_configs]
TypeError: unbound method check() must be called with [model name]
instance as first argument (got nothing instead)
}}}

This is not mentioned in the release notes for Django 1.7 at all and
worked fine in previous versions:

https://docs.djangoproject.com/en/1.7/releases/1.7/

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

Django

unread,
Apr 27, 2014, 3:37:37 AM4/27/14
to django-...@googlegroups.com
#22526: New check method on models not documented in release notes
-------------------------------------+-------------------------------------
Reporter: kevin-brown | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version:
Component: Documentation | 1.7-beta-2
Severity: Release blocker | 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 aaugustin):

* severity: Normal => Release blocker
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted


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

Django

unread,
Apr 27, 2014, 1:37:42 PM4/27/14
to django-...@googlegroups.com
#22526: New check method on models not documented in release notes
-------------------------------------+-------------------------------------
Reporter: kevin-brown | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version:
Component: Documentation | 1.7-beta-2
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timo):

* has_patch: 0 => 1


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

Django

unread,
Apr 27, 2014, 2:14:38 PM4/27/14
to django-...@googlegroups.com
#22526: New check method on models not documented in release notes
-------------------------------------+-------------------------------------
Reporter: kevin-brown | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version:
Component: Documentation | 1.7-beta-2
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by loic84):

* stage: Accepted => Ready for checkin


Comment:

LGTM.

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

Django

unread,
Apr 27, 2014, 2:20:50 PM4/27/14
to django-...@googlegroups.com
#22526: New check method on models not documented in release notes
-------------------------------------+-------------------------------------
Reporter: kevin-brown | Owner: nobody
Type: | Status: closed

Cleanup/optimization | Version:
Component: Documentation | 1.7-beta-2
Severity: Release blocker | Resolution: fixed

Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"8905fcbda6854b5b7fdd8a1ee3277f8f1039e114"]:
{{{
#!CommitTicketReference repository=""
revision="8905fcbda6854b5b7fdd8a1ee3277f8f1039e114"
Fixed #22526 -- Added note about check() method to 1.7 release notes.

Thanks kevin-brown for the report.
}}}

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

Django

unread,
Apr 27, 2014, 2:21:11 PM4/27/14
to django-...@googlegroups.com
#22526: New check method on models not documented in release notes
-------------------------------------+-------------------------------------
Reporter: kevin-brown | Owner: nobody

Type: | Status: closed
Cleanup/optimization | Version:
Component: Documentation | 1.7-beta-2
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"529ae6087c8e68587689de646960235e95c26cf0"]:
{{{
#!CommitTicketReference repository=""
revision="529ae6087c8e68587689de646960235e95c26cf0"
[1.7.x] Fixed #22526 -- Added note about check() method to 1.7 release
notes.

Thanks kevin-brown for the report.

Backport of 8905fcbda6 from master
}}}

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

Reply all
Reply to author
Forward
0 new messages