[issue28424] pkgutil.get_data() doesn't work with namespace packages

2016-12-10 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the patch, Douglas! -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue28424] pkgutil.get_data() doesn't work with namespace packages

2016-12-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3484933ba904 by Brett Cannon in branch '3.5': Issue #28424: Document pkgutil.get_data() doesn't work with namespace packages. https://hg.python.org/cpython/rev/3484933ba904 New changeset c17d2a37d610 by Brett Cannon in branch '3.6': Merge for issue

[issue28424] pkgutil.get_data() doesn't work with namespace packages

2016-12-10 Thread Brett Cannon
Changes by Brett Cannon : -- versions: +Python 3.7 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28424] pkgutil.get_data() doesn't work with namespace packages

2016-12-10 Thread Brett Cannon
Brett Cannon added the comment: Patch LGTM. -- stage: -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue28424] pkgutil.get_data() doesn't work with namespace packages

2016-12-09 Thread Douglas Greiman
Douglas Greiman added the comment: Patch attached. Feel free to wordsmith. -- keywords: +patch Added file: http://bugs.python.org/file45825/issue28424.patch ___ Python tracker _

[issue28424] pkgutil.get_data() doesn't work with namespace packages

2016-10-14 Thread Nick Coghlan
Nick Coghlan added the comment: For 3.4/5/6, I agree this is a documentation issue, where the data files need to be given a *non*-namespaced directory to live in. However, it's worth explicitly noting that subpackages of namespace packages can themselves be regular packages, so one possible so

[issue28424] pkgutil.get_data() doesn't work with namespace packages

2016-10-14 Thread Brett Cannon
Brett Cannon added the comment: Xiang is right about why this doesn't work. If you would like to propose a patch to update the wording of the docs, Douglas, we could then consider applying it. It could be as simple as just adding "(e.g. the load for namespace packages does not implement get_da

[issue28424] pkgutil.get_data() doesn't work with namespace packages

2016-10-13 Thread Xiang Zhang
Xiang Zhang added the comment: The doc says: "If the package cannot be located or loaded, or it uses a loader which does not support get_data(), then None is returned". Namespace package gets a ``None`` loader and then does not support get_data. -- nosy: +brett.cannon, eric.snow, ncogh

[issue28424] pkgutil.get_data() doesn't work with namespace packages

2016-10-13 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue28424] pkgutil.get_data() doesn't work with namespace packages

2016-10-12 Thread Douglas Greiman
New submission from Douglas Greiman: pkg_util.get_data('mypackage', 'resourcename') returns None if 'mypackage' is a namespace package, because the package object has no __file__ attribute. A shell script is attached to reproduce this. This is either a bug to be fixed (my preference) or behav