Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#19692 closed Cleanup/optimization (fixed)

Replace HttpResponse.mimetype (deprecated) with content_type in doc examples

Reported by: Tim Graham Owned by: Aymeric Augustin
Component: Documentation Version: master
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I'm assuming we're also deprecating the mimetype argument on TemplateResponse and SimpleTemplateResponse? Alternatively, we'd have to add a shim to continue supporting mimetype for these classes once mimetype is removed from HttpResponse.__init__.

Attachments (2)

19692.diff (7.8 KB) - added by Tim Graham 4 years ago.
19692-2.diff (15.5 KB) - added by Aymeric Augustin 4 years ago.

Download all attachments as: .zip

Change History (10)

Changed 4 years ago by Tim Graham

Attachment: 19692.diff added

comment:1 Changed 4 years ago by Aymeric Augustin

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

I noticed that inconsistency a few days ago too. It isn't ideal to add a deprecation after RC1, but for the sake of consistency, +1.

comment:2 Changed 4 years ago by Simon Charette

Should we mark this as a Release Blocker?

comment:3 Changed 4 years ago by Aymeric Augustin

Severity: NormalRelease blocker

We should at least make a decision before the release!

comment:4 Changed 4 years ago by Aymeric Augustin

Owner: changed from nobody to Aymeric Augustin
Status: newassigned

And that decision is to proceed with the deprecation.

Changed 4 years ago by Aymeric Augustin

Attachment: 19692-2.diff added

comment:5 Changed 4 years ago by Aymeric Augustin

I completed Tim's documentation patch by adding DeprecationWarnings and updating remaining instances of mimetype in the code base.

This patch is for master. When backporting to 1.5, DeprecationWarning must be replaced with PendingDeprecationWarning.

comment:6 Changed 4 years ago by Aymeric Augustin <aymeric.augustin@…>

Resolution: fixed
Status: assignedclosed

In 89cb771be7b53c40642872cdbedb15943bdf8e34:

Fixed #19692 -- Completed deprecation of mimetype in favor of content_type.

Thanks Tim for the report and initial patch.

comment:7 Changed 4 years ago by Aymeric Augustin <aymeric.augustin@…>

In 11ec0253ab4cc926ab9e77619132cb398231ac33:

[1.5.x] Fixed #19692 -- Completed deprecation of mimetype in favor of content_type.

Thanks Tim for the report and initial patch.

Backport of 89cb771 from master.

comment:8 Changed 4 years ago by Aymeric Augustin <aymeric.augustin@…>

In 11ec0253ab4cc926ab9e77619132cb398231ac33:

[1.5.x] Fixed #19692 -- Completed deprecation of mimetype in favor of content_type.

Thanks Tim for the report and initial patch.

Backport of 89cb771 from master.

Note: See TracTickets for help on using tickets.
Back to Top