Opened 13 years ago

Closed 13 years ago

#15642 closed (fixed)

Dead code in http.__init__.py

Reported by: jammon Owned by: nobody
Component: HTTP handling Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In http.__init__.py the lines 329-331 read

            # *Important*: do not import settings any earlier because of note
            # in core.handlers.modpython.
            from django.conf import settings

and the same in lines 341-343. But it says from django.conf import settings already in line 124.
Lines 329-331 have been introduced in rev. 5609, and lines 341-343 in rev. 8460. The import in line 124 has been introduced in rev. 7814 three years ago.

So I cannot tell if the lines can be deleted or if the mentioned note in core.handlers.modpython should be obeyed.

Change History (2)

comment:1 by Julien Phalip, 13 years ago

Triage Stage: UnreviewedAccepted

Indeed, django.conf.settings is already imported at the module level on line 124, so those other imports and comments should be safely removable.

comment:2 by Adrian Holovaty, 13 years ago

Resolution: fixed
Status: newclosed

In [15916]:

Fixed #15642 -- Removed redundant imports in http/init.py. Thanks, jammon

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