This will stop pkg_resources from emitting unsettling warnings like this one:
Module backports was already imported from
/usr/lib/python2.6/site-packages is being added to sys.path
Some more information:
How can I trigger the warning from pkg_resources?
I have to import just the backports module first, and then import pkg_resources afterwards:
@peterjc, I think that is the commit I just accepted into this project by accepting this pull request? :)
Indeed - I'm not used to the BitBucket interface (GitHub does it a bit differently)
Huh, If I'd run across this earlier I would have suggested not using the pkg_resources/setuptools namespace stuff at all - its very fragile in development and the native namespace implementation from importlib is /much better/ - and efforts are underway to backport that as importlib2. So in the interim using the 'stub package with init only' approach (which you appear to have used) is about 1000% saner.