Opened 6 months ago

Closed 6 months ago

Last modified 9 days ago

#37132 closed Bug (wontfix)

Replaced Python 2-style super() call in SafeMIMEText.set_payload()

Reported by: anisia19 Owned by: anisia19
Component: Core (Mail) Version: dev
Severity: Normal Keywords:
Cc: anisia19 Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

SafeMIMEText.set_payload() in django/core/mail/message.py calls MIMEText.set_payload(self, payload, charset = charset), passing self explicitly as an unbound method call, a Python 2 idiom. This causes issues when is mocked with autospec, since self is then passed twice (once by the mock and once explicitly)

Change History (2)

comment:1 by Tim Graham, 6 months ago

Resolution: → wontfix
Status: assigned → closed

Given the code is deprecated (see # RemovedInDjango70Warning) right above the class, I don't think it makes sense to spend time on this.

comment:2 by Jacob Walls <jacobtylerwalls@…>, 9 days ago

In ca3f31b:

Refs #37132 -- Fixed outdated change note reference.

Since 9158562, Django docs have replaced "new in Django development
version" with Sphinx's standard "added in version _" change note.
Corrected advice to keep an eye out for the old phrase, and generalized
it to cover any version mismatches.

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