[New-bugs-announce] [issue35319] pkgutil.get_data() is a wrapper for a deprecated class

Kevin Norris report at bugs.python.org
Mon Nov 26 14:15:58 EST 2018

New submission from Kevin Norris <nykevin.norris at gmail.com>:

pkgutil.get_data()'s documentation[1] says it is a wrapper for importlib.abc.ResourceLoader.get_data(), but the latter's documentation[2] says the whole class is deprecated since 3.7.

Please either:

A. Formally deprecate pkgutil.get_data() (and ideally provide a "nice" alternative wrapper, so that I don't have to muck about with importlib's endless heterarchy of opaque objects which return other opaque objects).
B. Modify pkgutil.get_data() to use ResourceReader instead of ResourceLoader.
C. (A) or (B) has already been done, just document it.

[1]: https://docs.python.org/3/library/pkgutil.html#pkgutil.get_data
[2]: https://docs.python.org/3.8/library/importlib.html#importlib.abc.ResourceLoader

assignee: docs at python
components: Documentation, Library (Lib)
messages: 330456
nosy: Kevin.Norris, docs at python
priority: normal
severity: normal
status: open
title: pkgutil.get_data() is a wrapper for a deprecated class
type: behavior
versions: Python 3.7, Python 3.8

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list