[issue45675] pkgutil.get_data() doesn't add subpackages to parent packages when importing

2021-11-29 Thread Matt Wozniski
Matt Wozniski added the comment: I wondered if it would be backwards compatible to make `pkgutil.get_data()` delegate to `importlib.resources.read_binary()`. It isn't, because `pkgutil.get_data()` accepts a relative path for the resource, and `importlib.resources.read_binary()` accepts only

[issue45675] pkgutil.get_data() doesn't add subpackages to parent packages when importing

2021-11-05 Thread Brett Cannon
Brett Cannon added the comment: FYI the long-term plan is to deprecate pkgutil, so I would use newer APIs as provided by importlib. -- ___ Python tracker ___

[issue45675] pkgutil.get_data() doesn't add subpackages to parent packages when importing

2021-11-05 Thread Éric Araujo
Change by Éric Araujo : -- nosy: +brett.cannon, eric.snow, ncoghlan versions: +Python 3.11 -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___

[issue45675] pkgutil.get_data() doesn't add subpackages to parent packages when importing

2021-10-29 Thread Matt Wozniski
Matt Wozniski added the comment: The original case where I encountered this was with a namespace package, but the behavior appears to be the same for a subpackage of a regular package. -- title: pkgutil.get_data() doesn't add subpackages to namespaces when importing ->