Re: [Django] #35372: Remove convenience imports in django/core/mail/__init__.py (was: Obsolete code in django\core\mail\__init__.py ?)

6 views
Skip to first unread message

Django

unread,
Apr 14, 2024, 1:33:00 PM4/14/24
to django-...@googlegroups.com
#35372: Remove convenience imports in django/core/mail/__init__.py
-------------------------------------+-------------------------------------
Reporter: Danic | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Core (Mail) | Version: 5.0
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* resolution: => wontfix
* status: new => closed
* summary: Obsolete code in django\core\mail\__init__.py ? => Remove
convenience imports in django/core/mail/__init__.py


Old description:

> 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
> commend should be updated?

New description:

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?

--
Comment:

The imports and comment look fine to me.
--
Ticket URL: <https://code.djangoproject.com/ticket/35372#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Reply all
Reply to author
Forward
0 new messages