astropy/astropy — Issue #94: astropy.config.data._find_pkg_data_fn() generates tons of ImportWarnings
Author: mdboom
Created: 2011-11-28 22:05:15+00:00
State: open

```
In [1]: import warnings

In [2]: warnings.simplefilter('always')

In [4]: from astropy.config import get_data_fileobj

In [5]: get_data_fileobj("astropy/wcs/tests/data/3d_cd.hdr")
astropy/wcs/tests/data
/usr/lib/python2.7/pkgutil.py:186: ImportWarning: Not importing directory '/home/mdboom/Work/builds/astropy/astropy/wcs/tests/data': missing __init__.py
file, filename, etc = imp.find_module(subname, path)
/usr/lib/python2.7/pkgutil.py:186: ImportWarning: Not importing directory '/home/mdboom/python/lib/python2.7/site-packages/astropy-0.0dev_r455-py2.7-linux-x86_64.egg/astropy/wcs/tests/data': missing __init__.py
file, filename, etc = imp.find_module(subname, path)
/usr/lib/python2.7/pkgutil.py:186: ImportWarning: Not importing directory '/home/mdboom/python/lib/python2.7/site-packages/astropy-0.0dev_r455-py2.7-linux-x86_64.egg/astropy/wcs/tests/data': missing __init__.py
file, filename, etc = imp.find_module(subname, path)
/usr/lib/python2.7/pkgutil.py:186: ImportWarning: Not importing directory 'astropy/wcs/tests/data': missing __init__.py
file, filename, etc = imp.find_module(subname, path)
/usr/lib/python2.7/pkgutil.py:186: ImportWarning: Not importing directory '/home/mdboom/python/local/lib/python2.7/site-packages/astropy-0.0dev_r455-py2.7-linux-x86_64.egg/astropy/wcs/tests/data': missing __init__.py
file, filename, etc = imp.find_module(subname, path)
/usr/lib/python2.7/pkgutil.py:186: ImportWarning: Not importing directory '/home/mdboom/python/lib/python2.7/site-packages/astropy-0.0dev_r455-py2.7-linux-x86_64.egg/astropy/wcs/tests/data': missing __init__.py
file, filename, etc = imp.find_module(subname, path)
astropy/wcs/tests
Out[5]:
```

It would be great if no warnings were generated. It's not clear to me why anything needs to be imported just to find the data files relative to the source files.