Opened 11 years ago

Closed 11 years ago

#20771 closed Cleanup/optimization (wontfix)

importlib: more verbosity please

Reported by: lu.nemec@… Owned by: nobody
Component: Utilities Version: 1.5
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Hello, I recently debugged some code where relative imports were used
Importlib threw an error "relative imports require the 'package' argument"

But, it would be really handy to have it also write what is it trying to import...

So I edited the file locally to this:

importlib.py

#27 if not package:
#28     raise TypeError("relative imports require the 'package' argument, package: %s" % name)

And I found the place where I forgot to look in seconds....

Cheers!

Change History (2)

comment:1 by Tim Graham, 11 years ago

Easy pickings: set
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

comment:2 by Tim Graham, 11 years ago

Resolution: wontfix
Status: newclosed

This is actually a copy of what's implemented in Python 2.7+ and the copy in Django has been deprecated as of fdd7a355bf053217d25b8d2189e37069c1304283.

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