Re: [Django] #35631: Include quality value when parsing Accept header

2024-09-09 Thread Django
#35631: Include quality value when parsing Accept header
-+-
 Reporter:  Jake Howard  |Owner:  Jake
 |  Howard
 Type:  New feature  |   Status:  closed
Component:  HTTP handling|  Version:  5.0
 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 Sarah Boyce <42296566+sarahboyce@…>):

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

Comment:

 In [changeset:"e161bd4657177f0e723a14a6e414884363b31a5d" e161bd46]:
 {{{#!CommitTicketReference repository=""
 revision="e161bd4657177f0e723a14a6e414884363b31a5d"
 Fixed #35631 -- Added HttpRequest.get_preferred_type().
 }}}
-- 
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/01070191d63c0256-b0ac36f7-7a92-4292-817e-3be1a1f26c0a-00%40eu-central-1.amazonses.com.


Re: [Django] #35631: Include quality value when parsing Accept header

2024-09-09 Thread Django
#35631: Include quality value when parsing Accept header
-+-
 Reporter:  Jake Howard  |Owner:  Jake
 |  Howard
 Type:  New feature  |   Status:  assigned
Component:  HTTP handling|  Version:  5.0
 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 Sarah Boyce):

 * 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/01070191d5d7a5be-7e5c411e-f5d0-4ca1-b392-ad3fc131e586-00%40eu-central-1.amazonses.com.


Re: [Django] #35631: Include quality value when parsing Accept header

2024-09-03 Thread Django
#35631: Include quality value when parsing Accept header
---+---
 Reporter:  Jake Howard|Owner:  Jake Howard
 Type:  New feature|   Status:  assigned
Component:  HTTP handling  |  Version:  5.0
 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 Sarah Boyce):

 * 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/01070191bbce06af-d905bc31-15ab-46e8-ac50-de2bc4b7b681-00%40eu-central-1.amazonses.com.


Re: [Django] #35631: Include quality value when parsing Accept header

2024-09-03 Thread Django
#35631: Include quality value when parsing Accept header
---+---
 Reporter:  Jake Howard|Owner:  Jake Howard
 Type:  New feature|   Status:  assigned
Component:  HTTP handling  |  Version:  5.0
 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 Jake Howard):

 * needs_better_patch:  1 => 0

-- 
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/01070191b8602a01-a171ebb1-5a9d-41bf-968c-14dc5b21917b-00%40eu-central-1.amazonses.com.


Re: [Django] #35631: Include quality value when parsing Accept header

2024-09-02 Thread Django
#35631: Include quality value when parsing Accept header
---+---
 Reporter:  Jake Howard|Owner:  Jake Howard
 Type:  New feature|   Status:  assigned
Component:  HTTP handling  |  Version:  5.0
 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 Sarah Boyce):

 * 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/01070191b286600b-e776f7de-9bb7-4d3d-94e0-a83b92e71c54-00%40eu-central-1.amazonses.com.


Re: [Django] #35631: Include quality value when parsing Accept header

2024-08-20 Thread Django
#35631: Include quality value when parsing Accept header
---+---
 Reporter:  Jake Howard|Owner:  Jake Howard
 Type:  New feature|   Status:  assigned
Component:  HTTP handling  |  Version:  5.0
 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 Jake Howard):

 * needs_better_patch:  1 => 0

-- 
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/01070191707a1a0d-fe56b778-e31b-455a-b894-057bda6bad17-00%40eu-central-1.amazonses.com.


Re: [Django] #35631: Include quality value when parsing Accept header

2024-08-19 Thread Django
#35631: Include quality value when parsing Accept header
---+---
 Reporter:  Jake Howard|Owner:  Jake Howard
 Type:  New feature|   Status:  assigned
Component:  HTTP handling  |  Version:  5.0
 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 Sarah Boyce):

 * 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/0107019169bda610-835faf17-1c72-4cf9-9e81-6eb5c22679a9-00%40eu-central-1.amazonses.com.


Re: [Django] #35631: Include quality value when parsing Accept header

2024-08-15 Thread Django
#35631: Include quality value when parsing Accept header
---+---
 Reporter:  Jake Howard|Owner:  Jake Howard
 Type:  New feature|   Status:  assigned
Component:  HTTP handling  |  Version:  5.0
 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 Jake Howard):

 * needs_better_patch:  1 => 0

-- 
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/01070191568121d0-5dfb5a6b-257c-4ab0-905c-721c88e1d676-00%40eu-central-1.amazonses.com.


Re: [Django] #35631: Include quality value when parsing Accept header

2024-08-13 Thread Django
#35631: Include quality value when parsing Accept header
---+---
 Reporter:  Jake Howard|Owner:  Jake Howard
 Type:  New feature|   Status:  assigned
Component:  HTTP handling  |  Version:  5.0
 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 Sarah Boyce):

 * 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/010701914afafbbd-3113a4ae-45a2-4982-bb82-596ad60de076-00%40eu-central-1.amazonses.com.


Re: [Django] #35631: Include quality value when parsing Accept header

2024-08-07 Thread Django
#35631: Include quality value when parsing Accept header
---+---
 Reporter:  Jake Howard|Owner:  Jake Howard
 Type:  New feature|   Status:  assigned
Component:  HTTP handling  |  Version:  5.0
 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
---+---
Comment (by Jake Howard):

 [https://github.com/django/django/pull/18415 PR] now contains docs -
 review away!
-- 
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/010701912c3eb907-12412f67-e9ae-43d6-80f0-51913ab9b2bf-00%40eu-central-1.amazonses.com.


Re: [Django] #35631: Include quality value when parsing Accept header

2024-07-26 Thread Django
#35631: Include quality value when parsing Accept header
---+---
 Reporter:  Jake Howard|Owner:  Jake Howard
 Type:  New feature|   Status:  assigned
Component:  HTTP handling  |  Version:  5.0
 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 Jake Howard):

 * has_patch:  0 => 1

Comment:

 I've implemented the core of this feature here:
 [https://github.com/django/django/pull/35631 PR], sans docs.

 I'd appreciate a review, particularly around what API surface to expose.
-- 
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/01070190ef4b32ff-e9b9b8a0-4654-41b8-b025-60174a993b38-00%40eu-central-1.amazonses.com.


Re: [Django] #35631: Include quality value when parsing Accept header

2024-07-26 Thread Django
#35631: Include quality value when parsing Accept header
---+---
 Reporter:  Jake Howard|Owner:  Jake Howard
 Type:  New feature|   Status:  assigned
Component:  HTTP handling  |  Version:  5.0
 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:

 I think step 3 should read "Sort Request.accepted_types by quality value
 and specificity", e.g. `text/*;q=0.8,text/html;q=0.8` should be sorted
 `text/html` first.

 This is probably a sensible proposal. I suspect most people are not
 sending the quality value, so `1` is assumed and it has no effect.
 Nonetheless why not allow it?

 We'd need a new helper API on HttpRequest taking a set of mime types to
 match against, since the specificity question (`text/*`) makes it slightly
 more complex than just returning the first match in accepted_types from
 the set.

 DRF has implementations of this logic that can be used for reference:

 * [https://github.com/encode/django-rest-
 
framework/blob/8e304e1adbb0f99f91a15ed3abd379104bba3b89/rest_framework/negotiation.py#L53-L76
 rest_framework/negotiation.py#L53-L76]
 * [https://github.com/encode/django-rest-
 
framework/blob/8e304e1adbb0f99f91a15ed3abd379104bba3b89/rest_framework/utils/mediatypes.py#L27-L81
 rest_framework/utils/mediatypes.py#L27-L81]
-- 
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/01070190edf82616-de401f6e-00d0-413f-a63b-6a82bc6ee296-00%40eu-central-1.amazonses.com.