Re: [Django] #31546: Replace Command.requires_system_checks = True by something like Command.required_system_checks = '__all__'

25 views
Skip to first unread message

Django

unread,
May 7, 2020, 6:06:02 AM5/7/20
to django-...@googlegroups.com
#31546: Replace Command.requires_system_checks = True by something like
Command.required_system_checks = '__all__'
-------------------------------------+-------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan
Type: | Ramezani
Cleanup/optimization | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Hasan Ramezani):

* owner: nobody => Hasan Ramezani
* status: new => assigned
* type: Uncategorized => Cleanup/optimization


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

Django

unread,
May 7, 2020, 6:06:16 AM5/7/20
to django-...@googlegroups.com
#31546: Replace Command.requires_system_checks = True by something like
Command.required_system_checks = '__all__'
-------------------------------------+-------------------------------------
Reporter: Hasan | Owner: nobody
Ramezani |
Type: | Status: new
Uncategorized |
Component: Core | Version: master
(Management commands) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |

Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Created based on Simon
[https://github.com/django/django/pull/12869#discussion_r421127952 comment
on the PR]

This makes me wonder if we want to replace `Command.requires_system_checks
= True` by something like `Command.required_system_checks = '__all__'`
that can be set to an empty list to achieve `required_system_checks =
False` and allow subclasses that want only a subset to specify tags
through it e.g. `required_system_checks = ['staticfiles']`. That would
prevent having do to the manual and error prone `options['skip_checks']
dance`. In all cases that should be done in a different PR.

--
Ticket URL: <https://code.djangoproject.com/ticket/31546>

Django

unread,
May 13, 2020, 3:13:18 AM5/13/20
to django-...@googlegroups.com
#31546: Replace Command.requires_system_checks = True by something like
Command.required_system_checks = '__all__'
-------------------------------------+-------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan
Type: | Ramezani
Cleanup/optimization | Status: assigned
Component: Core (Management | Version: master
commands) |
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 Carlton Gibson):

* stage: Unreviewed => Accepted


Comment:

OK, accepting based on the discussion on the PR. Thanks!

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

Django

unread,
May 13, 2020, 6:06:34 PM5/13/20
to django-...@googlegroups.com
#31546: Replace Command.requires_system_checks = True by something like
Command.required_system_checks = '__all__'
-------------------------------------+-------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan
Type: | Ramezani
Cleanup/optimization | Status: assigned
Component: Core (Management | Version: master
commands) |
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 Hasan Ramezani):

I created a [https://github.com/django/django/pull/12910 PR] for start.
Should we go for deprecating the `requires_system_checks = True/False`?

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

Django

unread,
May 14, 2020, 12:04:55 AM5/14/20
to django-...@googlegroups.com
#31546: Replace Command.requires_system_checks = True by something like
Command.required_system_checks = '__all__'
-------------------------------------+-------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan
Type: | Ramezani
Cleanup/optimization | Status: assigned
Component: Core (Management | Version: master
commands) |
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 felixxm):

Replying to [comment:3 Hasan Ramezani]:


> I created a [https://github.com/django/django/pull/12910 PR] for start.
> Should we go for deprecating the `requires_system_checks = True/False`?

Yes.

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

Django

unread,
May 14, 2020, 5:07:44 PM5/14/20
to django-...@googlegroups.com
#31546: Replace Command.requires_system_checks = True by something like
Command.required_system_checks = '__all__'
-------------------------------------+-------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan
Type: | Ramezani
Cleanup/optimization | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | 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 Hasan Ramezani):

* has_patch: 0 => 1


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

Django

unread,
May 20, 2020, 2:41:17 AM5/20/20
to django-...@googlegroups.com
#31546: Replace Command.requires_system_checks = True by something like
Command.required_system_checks = '__all__'
-------------------------------------+-------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan
Type: | Ramezani
Cleanup/optimization | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/31546#comment:6>

Django

unread,
May 21, 2020, 6:21:57 AM5/21/20
to django-...@googlegroups.com
#31546: Replace Command.requires_system_checks = True by something like
Command.required_system_checks = '__all__'
-------------------------------------+-------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan
Type: | Ramezani
Cleanup/optimization | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/31546#comment:7>

Django

unread,
May 21, 2020, 7:02:58 AM5/21/20
to django-...@googlegroups.com
#31546: Replace Command.requires_system_checks = True by something like
Command.required_system_checks = '__all__'
-------------------------------------+-------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan
Type: | Ramezani
Cleanup/optimization | Status: closed

Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson <carlton.gibson@…>):

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


Comment:

In [changeset:"c60524c658f197f645b638f9bcc553103bfe2630" c60524c6]:
{{{
#!CommitTicketReference repository=""
revision="c60524c658f197f645b638f9bcc553103bfe2630"
Fixed #31546 -- Allowed specifying list of tags in
Command.requires_system_checks.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31546#comment:8>

Django

unread,
Sep 20, 2021, 3:23:13 PM9/20/21
to django-...@googlegroups.com
#31546: Replace Command.requires_system_checks = True by something like
Command.required_system_checks = '__all__'
-------------------------------------+-------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan
Type: | Ramezani
Cleanup/optimization | Status: closed
Component: Core (Management | Version: dev

commands) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"1cb495074f6d983096a015736fed16176588cd33" 1cb4950]:
{{{
#!CommitTicketReference repository=""
revision="1cb495074f6d983096a015736fed16176588cd33"
Refs #31546 -- Removed support for boolean values in
Command.requires_system_checks.

Per deprecation timeline.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31546#comment:9>

Django

unread,
Jan 10, 2023, 11:37:29 PM1/10/23
to django-...@googlegroups.com
#31546: Replace Command.requires_system_checks = True by something like
Command.required_system_checks = '__all__'
-------------------------------------+-------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan
Type: | Ramezani
Cleanup/optimization | Status: closed
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"829f4d1448f7b40238b47592fc17061bf77b0f23" 829f4d1]:
{{{
#!CommitTicketReference repository=""
revision="829f4d1448f7b40238b47592fc17061bf77b0f23"
Refs #31546, Refs #34118 -- Corrected
CommandTests.test_requires_system_checks_specific().

System checks are never called without skip_checks=False. Moreover,
called_once_with() is not a proper assertion and raise AttributeError
on Python 3.12.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31546#comment:10>

Reply all
Reply to author
Forward
0 new messages