[New-bugs-announce] [issue45364] Add more documentation for ModuleSpec.loader_state.

Eric Snow report at bugs.python.org
Mon Oct 4 10:51:53 EDT 2021


New submission from Eric Snow <ericsnowcurrently at gmail.com>:

Currently ModuleSpec.loader_state is documented briefly once in the importlib docs. [1]  It should have more explanation, e.g. about when/why it should be used.  It should also be mentioned meaningfully in the MetapathFinder [2] and Loader [3] docs, as well as in the language reference [4].

Also see https://github.com/python/cpython/pull/28633#discussion_r720865971.

Note that ModuleSpec (and loader_state) were added in 3.4, so this documentation-only change would be helpful all the way back.  At the least we should update the docs back to 3.9, the current bug-fix release.


[1] https://docs.python.org/3/library/importlib.html#importlib.machinery.ModuleSpec.loader_state
[2] https://docs.python.org/3/library/importlib.html#importlib.abc.MetaPathFinder
[3] https://docs.python.org/3/library/importlib.html#importlib.abc.Loader
[4] https://docs.python.org/3/reference/import.html#loaders or https://docs.python.org/3/reference/import.html#module-spec

----------
assignee: docs at python
components: Documentation
messages: 403141
nosy: barry, brett.cannon, docs at python, eric.snow, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Add more documentation for ModuleSpec.loader_state.
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45364>
_______________________________________


More information about the New-bugs-announce mailing list