Shailesh Kumar wrote:
> I generally make it /from zope.component._api import getUtility/ to make 
> PyDev happy. It doesn't hurt the code and I don't have to see the 
> 'unresolved import message'.

You shouldn't do this. You shouldn't import from a module starting with 
an underscore. It's the developers' way of telling you to treat it as 
internal. 'from zope.component import getUtility' is almost certain to 
work "forever". The _api module could disappear in a refactoring tomorrow.

The only way to fix this is to make PyDev aware of zope.deferredimport. 
You could ask. :)


Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See

Zope3-users mailing list

Reply via email to