Re: [Django] #33611: Allow View subclasses to define async method handlers.

2022-04-06 Thread Django
#33611: Allow View subclasses to define async method handlers.
-+-
 Reporter:  Carlton Gibson   |Owner:  Carlton
 |  Gibson
 Type:  New feature  |   Status:  closed
Component:  Generic views|  Version:  4.0
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  async, asgi, views   | 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 GitHub ):

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


Comment:

 In [changeset:"9ffd4eae2ce7a7100c98f681e2b6ab818df384a4" 9ffd4ea]:
 {{{
 #!CommitTicketReference repository=""
 revision="9ffd4eae2ce7a7100c98f681e2b6ab818df384a4"
 Fixed #33611 -- Allowed View subclasses to define async method handlers.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070180026a8cf7-d9e81183-60cd-4193-bf56-7ca4bdc5eb06-00%40eu-central-1.amazonses.com.


Re: [Django] #33611: Allow View subclasses to define async method handlers.

2022-04-06 Thread Django
#33611: Allow View subclasses to define async method handlers.
-+-
 Reporter:  Carlton Gibson   |Owner:  Carlton
 |  Gibson
 Type:  New feature  |   Status:  assigned
Component:  Generic views|  Version:  4.0
 Severity:  Normal   |   Resolution:
 Keywords:  async, asgi, views   | 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 Mariusz Felisiak):

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


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107017ffe0da215-879369f4-fd97-43e3-983c-73388c5d56ed-00%40eu-central-1.amazonses.com.


Re: [Django] #33611: Allow View subclasses to define async method handlers.

2022-04-05 Thread Django
#33611: Allow View subclasses to define async method handlers.
-+-
 Reporter:  Carlton Gibson   |Owner:  Carlton
 |  Gibson
 Type:  New feature  |   Status:  assigned
Component:  Generic views|  Version:  4.0
 Severity:  Normal   |   Resolution:
 Keywords:  async, asgi, views   | 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


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107017ff86e92b7-87d7884c-4f48-4d89-b7f7-19b452325fe5-00%40eu-central-1.amazonses.com.


Re: [Django] #33611: Allow View subclasses to define async method handlers.

2022-03-31 Thread Django
#33611: Allow View subclasses to define async method handlers.
-+-
 Reporter:  Carlton Gibson   |Owner:  Carlton
 |  Gibson
 Type:  New feature  |   Status:  assigned
Component:  Generic views|  Version:  4.0
 Severity:  Normal   |   Resolution:
 Keywords:  async, asgi, views   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * owner:  nobody => Carlton Gibson


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107017fdee436a7-601056be-431d-48fa-aa61-eef0621a3944-00%40eu-central-1.amazonses.com.


Re: [Django] #33611: Allow View subclasses to define async method handlers.

2022-03-31 Thread Django
#33611: Allow View subclasses to define async method handlers.
+
 Reporter:  Carlton Gibson  |Owner:  nobody
 Type:  New feature |   Status:  assigned
Component:  Generic views   |  Version:  4.0
 Severity:  Normal  |   Resolution:
 Keywords:  async, asgi, views  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+
Changes (by Mariusz Felisiak):

 * stage:  Unreviewed => Accepted


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107017fdedd4648-04dcc2b2-1fa7-41f6-8292-f6fb2c0cfe2a-00%40eu-central-1.amazonses.com.


Re: [Django] #33611: Allow View subclasses to define async method handlers.

2022-03-31 Thread Django
#33611: Allow View subclasses to define async method handlers.
+--
 Reporter:  Carlton Gibson  |Owner:  nobody
 Type:  New feature |   Status:  assigned
Component:  Generic views   |  Version:  4.0
 Severity:  Normal  |   Resolution:
 Keywords:  async, asgi, views  | Triage Stage:  Unreviewed
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+--
Description changed by Carlton Gibson:

Old description:

> The current [https://docs.djangoproject.com/en/4.0/topics/async/#async-
> views topic docs for Async views] say this about class-based views:
>
> > For a class-based view, this means making its __call__() method an
> async def (not its __init__() or as_view()).
>
> This isn't really appropriate for Django's class-based views:
>
> * We don't implement `__call__()`, rather going via `as_view() — for a
> per-request instance — and then `dispatch()`.
> * Users expect to implement the HTTP method handlers — `get`, `post`, and
> so on — rather than these ''more internal'' bits.
>
> Ideally we'd allow specifying `async def` at the method handler level, to
> allow using `await` in the handler, and writing views such as this:
>
> {{{
> import asyncio
> from django.http import HttpResponse
> from django.views import View
>
> class AsyncView(View):
> async def get(self, request, *args, **kwargs):
> # Perform io-blocking view-logic using await, sleep for
> example.
> await asyncio.sleep(1)
> return HttpResponse("Hello async world!")
> }}}

New description:

 The current [https://docs.djangoproject.com/en/4.0/topics/async/#async-
 views topic docs for Async views] say this about class-based views:

 > For a class-based view, this means making its `__call__()` method an
 async def (not its `__init__()` or `as_view()`).

 This isn't really appropriate for Django's class-based views:

 * We don't implement `__call__()`, rather going via `as_view()` — for a
 per-request instance — and then `dispatch()`.
 * Users expect to implement the HTTP method handlers — `get()`, `post()`,
 and so on — rather than these ''more internal'' bits.

 Ideally we'd allow specifying `async def` at the method handler level, to
 allow using `await` in the handler, and writing views such as this:

 {{{
 import asyncio
 from django.http import HttpResponse
 from django.views import View

 class AsyncView(View):
 async def get(self, request, *args, **kwargs):
 # Perform io-blocking view-logic using await, sleep for
 example.
 await asyncio.sleep(1)
 return HttpResponse("Hello async world!")
 }}}

--

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107017fdecfd641-b3877524-350f-47c5-9e85-6b20cf059bc1-00%40eu-central-1.amazonses.com.


Re: [Django] #33611: Allow View subclasses to define async method handlers.

2022-03-31 Thread Django
#33611: Allow View subclasses to define async method handlers.
+--
 Reporter:  Carlton Gibson  |Owner:  nobody
 Type:  New feature |   Status:  assigned
Component:  Generic views   |  Version:  4.0
 Severity:  Normal  |   Resolution:
 Keywords:  async, asgi, views  | 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):

 * component:  HTTP handling => Generic views


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107017fdeced6d3-d30a76b9-4b97-41d4-89f4-e25ad4aa2a67-00%40eu-central-1.amazonses.com.


Re: [Django] #33611: Allow View subclasses to define async method handlers.

2022-03-31 Thread Django
#33611: Allow View subclasses to define async method handlers.
+--
 Reporter:  Carlton Gibson  |Owner:  nobody
 Type:  New feature |   Status:  assigned
Component:  HTTP handling   |  Version:  4.0
 Severity:  Normal  |   Resolution:
 Keywords:  async, asgi, views  | 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):

 * cc: Andrew Godwin (added)


Comment:

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

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107017fdeca64b4-44540fa7-a455-424c-9888-13e9ca179f87-00%40eu-central-1.amazonses.com.


[Django] #33611: Allow View subclasses to define async method handlers.

2022-03-31 Thread Django
#33611: Allow View subclasses to define async method handlers.
-+-
   Reporter:  Carlton|  Owner:  nobody
  Gibson |
   Type:  New| Status:  assigned
  feature|
  Component:  HTTP   |Version:  4.0
  handling   |
   Severity:  Normal |   Keywords:  async, asgi, views
   Triage Stage: |  Has patch:  1
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 The current [https://docs.djangoproject.com/en/4.0/topics/async/#async-
 views topic docs for Async views] say this about class-based views:

 > For a class-based view, this means making its __call__() method an async
 def (not its __init__() or as_view()).

 This isn't really appropriate for Django's class-based views:

 * We don't implement `__call__()`, rather going via `as_view() — for a
 per-request instance — and then `dispatch()`.
 * Users expect to implement the HTTP method handlers — `get`, `post`, and
 so on — rather than these ''more internal'' bits.

 Ideally we'd allow specifying `async def` at the method handler level, to
 allow using `await` in the handler, and writing views such as this:

 {{{
 import asyncio
 from django.http import HttpResponse
 from django.views import View

 class AsyncView(View):
 async def get(self, request, *args, **kwargs):
 # Perform io-blocking view-logic using await, sleep for
 example.
 await asyncio.sleep(1)
 return HttpResponse("Hello async world!")
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107017fdec7b7db-c6341929-4bcf-475c-b025-6363ac973654-00%40eu-central-1.amazonses.com.