Code

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#14356 closed (fixed)

Unused import in django.core.management.sql

Reported by: xiaket 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 xiaket 4 years ago.
Removed obsolete import lines in django/core/management/sql.py

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by xiaket

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

comment:1 Changed 4 years ago by ericholscher

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

Confirmed that these imports are never used.

Perhaps a good pyflaking of the source is in order.

comment:2 Changed 4 years ago by Alex

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:3 Changed 4 years ago by Alex

(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 3 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.