importlib: more verbosity please
|Reported by:||lu.nemec@…||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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:
#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....
Change History (2)
comment:1 Changed 22 months ago by timo
- Easy pickings set
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
- Type changed from Uncategorized to Cleanup/optimization