Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#13464 closed (fixed)

django.utils.module_loading.has_submodule is incorrectly implemented

Reported by: Alex Gaynor Owned by: nobody
Component: Core (Other) Version: dev
Severity: Keywords:
Cc: Brett Cannon Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The main problem is we assume a loader has find_module method, which is only true if the loader and finder are a single class, which is in no way guaranteed. Brett Cannon has suggested an alternate implementation, which basically needs to re-implement the Python import machinery: http://paste.pocoo.org/show/209115/ (I'll turn it into a proper patch soonish)

Attachments (2)

django-importer.diff (5.9 KB ) - added by Alex Gaynor 15 years ago.
django-importer.2.diff (5.4 KB ) - added by Alex Gaynor 15 years ago.
Moar lazy

Download all attachments as: .zip

Change History (6)

by Alex Gaynor, 15 years ago

Attachment: django-importer.diff added

by Alex Gaynor, 15 years ago

Attachment: django-importer.2.diff added

Moar lazy

comment:1 by Alex Gaynor, 15 years ago

Has patch: set
Triage Stage: UnreviewedAccepted

comment:2 by Russell Keith-Magee, 15 years ago

Resolution: fixed
Status: newclosed

(In [13082]) Fixed #13464 -- Reworked module_has_submodule to break the requirement for loader and finder to be the same class. Thanks to Alex Gaynor for the report and patch, and Brett Cannon for suggesting the approach.

comment:3 by Russell Keith-Magee, 15 years ago

(In [13085]) [1.1.X] Fixed #13464 -- Reworked module_has_submodule to break the requirement for loader and finder to be the same class. Thanks to Alex Gaynor for the report and patch, and Brett Cannon for suggesting the approach.

Backport of r13082 from trunk.

comment:4 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

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