Opened 6 years ago

Closed 6 years ago

#15642 closed (fixed)

Dead code in http.__init__.py

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

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 Changed 6 years ago by Julien Phalip

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
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 Changed 6 years ago by Adrian Holovaty

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