[Django] #30420: Do not reload runserver during debugging / request processing

14 views
Skip to first unread message

Django

unread,
Apr 27, 2019, 10:13:11 PM4/27/19
to django-...@googlegroups.com
#30420: Do not reload runserver during debugging / request processing
-------------------------------------+-------------------------------------
Reporter: Daniel | Owner: nobody
Hahler |
Type: | Status: new
Cleanup/optimization |
Component: Core | Version: 2.2
(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 |
-------------------------------------+-------------------------------------
The server should not be restarted while debugging (`pdb.set_trace()`).

Use case:

1. `pdb.set_trace` in the code
2. trigger web request
3. start debugging / messing around, maybe even use `edit` (via pdbpp) to
edit files
4. save something being watched

This ends up in garbarge on the screen, and the server process/thread
getting killed.

This could be achieved using a thread lock.

See https://github.com/pallets/werkzeug/pull/1525/files for an example.

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

Django

unread,
Apr 30, 2019, 4:21:38 AM4/30/19
to django-...@googlegroups.com
#30420: Do not reload runserver during debugging / request processing
-------------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Management | Version: 2.2
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 Florian Apolloner):

* stage: Unreviewed => Accepted


Comment:

This would indeed be nice to have and looks rather simple to implement. Do
you want to submit a PR?

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

Django

unread,
Apr 30, 2019, 4:29:20 AM4/30/19
to django-...@googlegroups.com
#30420: Do not reload runserver during debugging / request processing
-------------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: nobody
Type: | Status: new
Cleanup/optimization |

Component: Core (Management | Version: 2.2
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 Daniel Hahler):

I'd do a PR only after some feedback on
https://github.com/pallets/werkzeug/pull/1525.

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

Django

unread,
Apr 30, 2019, 4:40:46 AM4/30/19
to django-...@googlegroups.com
#30420: Do not reload runserver during debugging / request processing
-------------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: nobody
Type: | Status: new
Cleanup/optimization |

Component: Core (Management | Version: 2.2
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 Florian Apolloner):

* cc: Florian Apolloner (added)


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

Django

unread,
Jun 21, 2019, 7:02:55 AM6/21/19
to django-...@googlegroups.com
#30420: Do not reload runserver during debugging / request processing
-------------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: nobody
Type: Bug | Status: new

Component: Core (Management | Version: 2.2
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 Giovanni Totaro - aka Vanni):

* type: Cleanup/optimization => Bug


Comment:

Any update on this bug?

The server process gets killed even on a cold start (i. e. without any
file reloading) when a line with `import ipdb; ipdb.set_trace()` is hit.

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

Django

unread,
Jun 21, 2019, 7:40:29 AM6/21/19
to django-...@googlegroups.com
#30420: Do not reload runserver during debugging / request processing
-------------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: nobody
Type: Bug | Status: new
Component: Core (Management | Version: 2.2
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 Florian Apolloner):

If there were an update the current comments would reflect that (usually
at least). So the current status is: Patches welcome :)

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

Django

unread,
Sep 13, 2019, 4:56:10 AM9/13/19
to django-...@googlegroups.com
#30420: Do not reload runserver during debugging / request processing
-------------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: nobody
Type: Bug | Status: new
Component: Core (Management | Version: 2.2
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 bunseokbot):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/11777 PR]

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

Django

unread,
Sep 13, 2019, 5:22:03 AM9/13/19
to django-...@googlegroups.com
#30420: Do not reload runserver during debugging / request processing
-------------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: Kim
| Namjun
Type: Bug | 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):

* status: new => assigned
* needs_better_patch: 0 => 1
* version: 2.2 => master
* owner: nobody => Kim Namjun


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

Django

unread,
Jul 5, 2021, 6:18:30 AM7/5/21
to django-...@googlegroups.com
#30420: Do not reload runserver during debugging / request processing
-------------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: Rohith P
| R
Type: Bug | Status: assigned
Component: Core (Management | Version: dev

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 Rohith P R):

* owner: Kim Namjun => Rohith P R


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

Django

unread,
Jul 5, 2021, 10:24:29 AM7/5/21
to django-...@googlegroups.com
#30420: Do not reload runserver during debugging / request processing
-------------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: Rohith P
| R
Type: Bug | Status: assigned
Component: Core (Management | Version: dev
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 Rohith P R):

* needs_better_patch: 1 => 0


Comment:

https://github.com/django/django/pull/14597

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

Django

unread,
Jul 9, 2021, 12:18:50 AM7/9/21
to django-...@googlegroups.com
#30420: Do not reload runserver during debugging / request processing
-------------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: Rohith P
| R
Type: Bug | Status: assigned
Component: Core (Management | Version: dev
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 Mariusz Felisiak):

* needs_better_patch: 0 => 1


Comment:

See [https://github.com/django/django/pull/14597#issuecomment-876791741
Tom's comment].

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

Django

unread,
Jun 21, 2023, 2:08:41 PM6/21/23
to django-...@googlegroups.com
#30420: Do not reload runserver during debugging / request processing
-------------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: Rohith P
| R
Type: Bug | Status: assigned
Component: Core (Management | Version: dev
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 Natalia Bidart):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/30420#comment:11>

Django

unread,
Jun 28, 2023, 2:23:25 AM6/28/23
to django-...@googlegroups.com
#30420: Do not reload runserver during debugging / request processing
-------------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: Rohith P
| R
Type: Bug | Status: assigned
Component: Core (Management | Version: dev
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 Mariusz Felisiak):

* has_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/30420#comment:12>

Reply all
Reply to author
Forward
0 new messages