Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#14356 closed (fixed)

Unused import in django.core.management.sql

Reported by: Xia Kai(夏恺) Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords: obsolete import
Cc: xiaket@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Hi,

There are several unused imports in source:django/trunk/django/core/management/sql.py

from django.contrib.contenttypes import generic
from django.dispatch import dispatcher
from django.db.backends.util import truncate_name

I read all the codes in this file and confirmed that the lines above are obsolete. I started a toy project and the management commands are working properly without these lines.

The above lines are introduced in [11952].

Attachments (1)

obsolete_imports.diff (653 bytes) - added by Xia Kai(夏恺) 6 years ago.
Removed obsolete import lines in django/core/management/sql.py

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by Xia Kai(夏恺)

Attachment: obsolete_imports.diff added

Removed obsolete import lines in django/core/management/sql.py

comment:1 Changed 6 years ago by Eric Holscher

Triage Stage: UnreviewedReady for checkin

Confirmed that these imports are never used.

Perhaps a good pyflaking of the source is in order.

comment:2 Changed 6 years ago by Alex Gaynor

Resolution: fixed
Status: newclosed

(In [14088]) Fixed #14356. Remove some dead imports from django.core.management.sql. Thanks to xiaket for the report and patch.

comment:3 Changed 6 years ago by Alex Gaynor

(In [14089]) [1.2.X] Fixed #14356. Remove some dead imports from django.core.management.sql. Thanks to xiaket for the report and patch. Backport of [14088].

comment:4 Changed 5 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

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