[Django] #37132: Replaced Python 2-style super() call in SafeMIMEText.set_payload()

3 views
Skip to first unread message

Django

unread,
May 31, 2026, 4:40:32 PM (2 days ago) May 31
to django-...@googlegroups.com
#37132: Replaced Python 2-style super() call in SafeMIMEText.set_payload()
---------------------------------------+--------------------------
Reporter: anisia19 | Owner: anisia19
Type: Bug | Status: assigned
Component: Core (Mail) | Version: dev
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------+--------------------------
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)
--
Ticket URL: <https://code.djangoproject.com/ticket/37132>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 1, 2026, 8:29:19 AM (yesterday) Jun 1
to django-...@googlegroups.com
#37132: Replaced Python 2-style super() call in SafeMIMEText.set_payload()
-----------------------------+--------------------------------------
Reporter: anisia19 | Owner: anisia19
Type: Bug | Status: closed
Component: Core (Mail) | Version: dev
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by Tim Graham):

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

Comment:

Given the code is deprecated (see `# RemovedInDjango70Warning`) right
above the class, I don't think it makes sense to spend time on this.
--
Ticket URL: <https://code.djangoproject.com/ticket/37132#comment:1>
Reply all
Reply to author
Forward
0 new messages