New submission from Lukáš Němec:

Hello,

recently I filed this bugreport to Django, but they clarified this by pointing 
me to commits for new version of Django that uses python builtin importlib 
(import_module)

But since most of their import_module code is done like [import_module(x) for y 
if blahblah], it is very difficult for me to debug code where Django tries to 
import some package, and all I get back is message "relative imports require 
the 'package' argument"

This message tells me exactly nothing :), just that something somewhere, even 
3rd party app tried to do relative imports ...

what did it import, with what parameters?

I edited this locally for debugging, and changed it to this:
"relative imports require the 'package' argument, package: %s" % name

This simple change of the message allowed me to find the problem in a few 
seconds..

Would you please consider adding something similar to importlib for better 
debugging?

Thank you :)

----------
components: Library (Lib)
messages: 193922
nosy: Lukáš.Němec
priority: normal
severity: normal
status: open
title: Importlib, more verbosity please
type: enhancement

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18598>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to