Opened 3 weeks ago

Closed 3 weeks 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 (1)

comment:1 by Tim Graham, 3 weeks ago

Resolution: wontfix
Status: assignedclosed

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

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