[Django] #32953: Enable optional auto-reloading for testserver

1 view
Skip to first unread message

Django

unread,
Jul 20, 2021, 3:26:01 PM7/20/21
to django-...@googlegroups.com
#32953: Enable optional auto-reloading for testserver
-------------------------------------+-------------------------------------
Reporter: Igor | Owner: Igor Bakutin
Bakutin |
Type: | Status: assigned
Uncategorized |
Component: Core | Version: 4.0
(Management commands) |
Severity: Normal | Keywords: testserver reloader
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
`django/core/management/commands/testserver.py:39` has the following
comment

{{{
# Run the development server. Turn off auto-reloading because it causes
# a strange error -- it causes this handle() method to be called
# multiple times.
}}}


The task is to fix the issue and add optional `--autoreload` flag to the
command

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

Django

unread,
Jul 20, 2021, 3:37:25 PM7/20/21
to django-...@googlegroups.com
#32953: Enable optional auto-reloading for testserver
-------------------------------------+-------------------------------------
Reporter: Igor Bakutin | Owner: Igor
| Bakutin
Type: New feature | Status: assigned
Component: Core (Management | Version: 4.0
commands) |
Severity: Normal | Resolution:

Keywords: testserver reloader | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

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

* type: Uncategorized => New feature


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

Django

unread,
Jul 20, 2021, 3:37:34 PM7/20/21
to django-...@googlegroups.com
#32953: Enable optional auto-reloading for testserver
-------------------------------------+-------------------------------------
Reporter: Igor Bakutin | Owner: Igor
| Bakutin
Type: New feature | Status: assigned
Component: Core (Management | Version: 4.0
commands) |
Severity: Normal | Resolution:
Keywords: testserver reloader | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

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

* owner: Igor Bakutin => Igor Bakutin


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

Django

unread,
Jul 27, 2021, 7:45:00 AM7/27/21
to django-...@googlegroups.com
#32953: Enable optional auto-reloading for testserver
-------------------------------------+-------------------------------------
Reporter: Igor Bakutin | Owner: Igor
| Bakutin
Type: New feature | Status: assigned
Component: Core (Management | Version: 4.0
commands) |
Severity: Normal | Resolution:
Keywords: testserver reloader | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

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

Comment (by Mariusz Felisiak):

Thanks for the ticket.

Replying to [ticket:32953 Igor Bakutin]:


> `django/core/management/commands/testserver.py:39` has the following
comment
>
> {{{
> # Run the development server. Turn off auto-reloading because it causes
> # a strange error -- it causes this handle() method to be called
> # multiple times.
> }}}

However, this comment was added in
9c55bbdef7f1717aa17f7ca17cb2396522426310 and that doesn't mean that 14
years later it's still a desirable feature. `testserver` is intended to
work with a database snapshot (loaded from fixtures) so it can be really
fragile for any changes in models or migrations. I'm not sure if we can
support it in a bulletproof way 🤔.

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

Django

unread,
Jul 31, 2021, 7:55:26 AM7/31/21
to django-...@googlegroups.com
#32953: Enable optional auto-reloading for testserver
-------------------------------------+-------------------------------------
Reporter: Igor Bakutin | Owner: Igor
| Bakutin
Type: New feature | Status: closed

Component: Core (Management | Version: 4.0
commands) |
Severity: Normal | Resolution: wontfix

Keywords: testserver reloader | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

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

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


Comment:

I too think this is probably a mistake to add. (If anything deprecating
the `testserver` command would be the way to go, rather than adding
surface area here.) If folks want autoreloading `runserver` should be
sufficient.

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

Reply all
Reply to author
Forward
0 new messages