[Django] #21483: [RFE] Add WSGI environ to request_started signal emission

15 views
Skip to first unread message

Django

unread,
Nov 21, 2013, 11:17:41 AM11/21/13
to django-...@googlegroups.com
#21483: [RFE] Add WSGI environ to request_started signal emission
------------------------------+--------------------
Reporter: jag@… | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------
As written, the request_started signal cannot take into account any of the
specifics of the aforementioned request in a connected handler. The signal
provided args should add the WSGI environ to the emitted signal to allow
connected handlers to act related to the request's context.

Pull request provided here: https://github.com/django/django/pull/1951

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

Django

unread,
Nov 21, 2013, 7:53:42 PM11/21/13
to django-...@googlegroups.com
#21483: [RFE] Add WSGI environ to request_started signal emission
------------------------------+------------------------------------

Reporter: jag@… | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0

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

* needs_better_patch: => 0
* needs_docs: => 1
* needs_tests: => 1
* stage: Unreviewed => Accepted


Comment:

Suggestions noted on the PR! Assign this ticket to yourself if you are
planning to work on it ;-)

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

Django

unread,
Nov 22, 2013, 10:21:05 AM11/22/13
to django-...@googlegroups.com
#21483: [RFE] Add WSGI environ to request_started signal emission
------------------------------+-------------------------------------
Reporter: jag@… | Owner: anonymous
Type: New feature | Status: assigned

Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+-------------------------------------
Changes (by Joshua "jag" Ginsberg <jag@…>):

* status: new => assigned
* owner: nobody => anonymous


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

Django

unread,
Nov 26, 2013, 5:43:10 PM11/26/13
to django-...@googlegroups.com
#21483: [RFE] Add WSGI environ to request_started signal emission
------------------------------+-------------------------------------
Reporter: jag@… | Owner: anonymous
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+-------------------------------------

Comment (by Joshua "jag" Ginsberg <jag@…>):

PR amended with suggestions. Thanks!

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

Django

unread,
Nov 26, 2013, 6:01:28 PM11/26/13
to django-...@googlegroups.com
#21483: [RFE] Add WSGI environ to request_started signal emission
------------------------------+-------------------------------------
Reporter: jag@… | Owner: anonymous
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+-------------------------------------

Comment (by aaugustin):

I'm wondering if whatever you're planning to do in the signal receiver
wouldn't be better implemented in a middleware.

But maybe that's just my phobia of signals :)

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

Django

unread,
Dec 4, 2013, 11:26:34 AM12/4/13
to django-...@googlegroups.com
#21483: [RFE] Add WSGI environ to request_started signal emission
------------------------------+-------------------------------------
Reporter: jag@… | Owner: anonymous
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+-------------------------------------

Comment (by Joshua "jag" Ginsberg <jag@…>):

For many (most?) cases, I'd agree with you - middleware has that
explicitness, where as signals are automated magic. However the signal is
the absolute earliest place to modify the handling of a request - for
cases where middleware may even be too late, doing work with a signal
handler could be the best option.

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

Django

unread,
Aug 13, 2014, 8:04:13 AM8/13/14
to django-...@googlegroups.com
#21483: [RFE] Add WSGI environ to request_started signal emission
------------------------------+-------------------------------------
Reporter: jag@… | Owner: anonymous
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
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 timgraham):

* needs_better_patch: 0 => 1
* needs_tests: 1 => 0
* needs_docs: 1 => 0


Comment:

I left comments for improvement on the PR. Please uncheck "Patch needs
improvement" when you update it, thanks.

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

Django

unread,
Aug 29, 2014, 10:15:02 AM8/29/14
to django-...@googlegroups.com
#21483: [RFE] Add WSGI environ to request_started signal emission
------------------------------+-------------------------------------
Reporter: jag@… | Owner: anonymous
Type: New feature | Status: closed

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

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 Tim Graham <timograham@…>):

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


Comment:

In [changeset:"eb2af16c59c3014541e2ad8ca63e510bc076dd8b"]:
{{{
#!CommitTicketReference repository=""
revision="eb2af16c59c3014541e2ad8ca63e510bc076dd8b"
Fixed #21483 -- Added WSGI environ to kwargs sent to request_started
signal.
}}}

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

Reply all
Reply to author
Forward
0 new messages