[3.12] gh-106892: Use roles :data: and :const: for referencing module variables (GH-106894) (GH-106954)

(cherry picked from commit d036db728e)
This commit is contained in:
Serhiy Storchaka 2023-07-21 14:51:00 +03:00 committed by GitHub
parent 84e52171b5
commit ffc7678f46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 111 additions and 111 deletions

View file

@ -126,9 +126,9 @@ Importing Modules
read from a Python bytecode file or obtained from the built-in function
:func:`compile`, load the module. Return a new reference to the module object,
or ``NULL`` with an exception set if an error occurred. *name*
is removed from :attr:`sys.modules` in error cases, even if *name* was already
in :attr:`sys.modules` on entry to :c:func:`PyImport_ExecCodeModule`. Leaving
incompletely initialized modules in :attr:`sys.modules` is dangerous, as imports of
is removed from :data:`sys.modules` in error cases, even if *name* was already
in :data:`sys.modules` on entry to :c:func:`PyImport_ExecCodeModule`. Leaving
incompletely initialized modules in :data:`sys.modules` is dangerous, as imports of
such modules have no way to know that the module object is an unknown (and
probably damaged with respect to the module author's intents) state.