diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-07-23 14:49:00 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-07-23 14:49:00 (GMT) |
commit | 6dfbc5d98eee400fa7b775b53c11a4e37fca3547 (patch) | |
tree | 55814dd0db1c026013bfdc912a1ecd81e684248d /Doc | |
parent | f1b5ccb9937b8336078f023bf7deb6615a5e28c8 (diff) | |
download | cpython-6dfbc5d98eee400fa7b775b53c11a4e37fca3547.zip cpython-6dfbc5d98eee400fa7b775b53c11a4e37fca3547.tar.gz cpython-6dfbc5d98eee400fa7b775b53c11a4e37fca3547.tar.bz2 |
Issue #13248: Remove inspect.getmoduleinfo() from 3.6 (deprecated in 3.3)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/inspect.rst | 21 | ||||
-rw-r--r-- | Doc/whatsnew/3.6.rst | 4 |
2 files changed, 5 insertions, 20 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index b5c4a7a..1d0edea 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -227,24 +227,6 @@ attributes: listed in the metaclass' custom :meth:`__dir__`. -.. function:: getmoduleinfo(path) - - Returns a :term:`named tuple` ``ModuleInfo(name, suffix, mode, module_type)`` - of values that describe how Python will interpret the file identified by - *path* if it is a module, or ``None`` if it would not be identified as a - module. In that tuple, *name* is the name of the module without the name of - any enclosing package, *suffix* is the trailing part of the file name (which - may not be a dot-delimited extension), *mode* is the :func:`open` mode that - would be used (``'r'`` or ``'rb'``), and *module_type* is an integer giving - the type of the module. *module_type* will have a value which can be - compared to the constants defined in the :mod:`imp` module; see the - documentation for that module for more information on module types. - - .. deprecated:: 3.3 - You may check the file path's suffix against the supported suffixes - listed in :mod:`importlib.machinery` to infer the same information. - - .. function:: getmodulename(path) Return the name of the module named by the file *path*, without including the @@ -258,8 +240,7 @@ attributes: still return ``None``. .. versionchanged:: 3.3 - This function is now based directly on :mod:`importlib` rather than the - deprecated :func:`getmoduleinfo`. + The function is based directly on :mod:`importlib`. .. function:: ismodule(object) diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst index b6388d5..c881d30 100644 --- a/Doc/whatsnew/3.6.rst +++ b/Doc/whatsnew/3.6.rst @@ -148,6 +148,10 @@ API and Feature Removals * ``inspect.getargspec()`` was removed (was deprecated since CPython 3.0). :func:`inspect.getfullargspec` is an almost drop in replacement. +* ``inspect.getmoduleinfo`` was removed (was deprecated since CPython 3.3). + :func:`inspect.getmodulename` should be used for obtaining the module + name for a given path. + Porting to Python 3.6 ===================== |