Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#19692 closed Cleanup/optimization (fixed)

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

Reported by: timo Owned by: aaugustin
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 timo 3 years ago.
19692-2.diff (15.5 KB) - added by aaugustin 2 years ago.

Download all attachments as: .zip

Change History (10)

Changed 3 years ago by timo

comment:1 Changed 3 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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 3 years ago by charettes

Should we mark this as a Release Blocker?

comment:3 Changed 3 years ago by aaugustin

  • Severity changed from Normal to Release blocker

We should at least make a decision before the release!

comment:4 Changed 2 years ago by aaugustin

  • Owner changed from nobody to aaugustin
  • Status changed from new to assigned

And that decision is to proceed with the deprecation.

Changed 2 years ago by aaugustin

comment:5 Changed 2 years ago by aaugustin

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 2 years ago by Aymeric Augustin <aymeric.augustin@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In 89cb771be7b53c40642872cdbedb15943bdf8e34:

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

Thanks Tim for the report and initial patch.

comment:7 Changed 2 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 2 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