Opened 7 months ago
Closed 7 months ago
#35372 closed Cleanup/optimization (wontfix)
Remove convenience imports in django/core/mail/__init__.py
Reported by: | Danic | Owned by: | nobody |
---|---|---|---|
Component: | Core (Mail) | Version: | 5.0 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
I found the following comment in django\core\mail\init.py
# Imported for backwards compatibility and for the sake
# of a cleaner namespace. These symbols used to be in
# django/core/mail.py before the introduction of email
# backends and the subsequent reorganization (See #10355)
#10355 relates to Django 1. As it's out of support, it maybe doesn't make sense to keep the backwards compatibility. Would it make sense to have a look at that file and check what of the code can be removed or if the comment should be updated?
Change History (2)
comment:1 by , 7 months ago
comment:2 by , 7 months ago
Description: | modified (diff) |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Summary: | Obsolete code in django\core\mail\__init__.py ? → Remove convenience imports in django/core/mail/__init__.py |
The imports and comment look fine to me.
I don't think we should remove these imports for a couple of reasons:
django.core.mail
, egSafeMIMEText
here: https://docs.djangoproject.com/en/5.0/topics/email/#emailmessage-objectsIf anything maybe we could remove the comment? 🤔