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 behavior to be documented.  
If there is equivalent, working functionality in the new importlib, that would 
also be a good to document.

components: Library (Lib)
messages: 278543
nosy: dgreiman
priority: normal
severity: normal
status: open
title: pkgutil.get_data() doesn't work with namespace packages
type: behavior
versions: Python 3.4, Python 3.5
Added file:

Python tracker <>
Python-bugs-list mailing list

Reply via email to