Skip to content

Commit

Permalink
[3.9] bpo-42811: Update importlib.utils.resolve_name() docs to use __…
Browse files Browse the repository at this point in the history
…spec__.parent (GH-24100) (GH-24149)

This is a backport of 
#24100

Automerge-Triggered-By: GH:brettcannon
  • Loading branch information
yairfrid committed Jan 7, 2021
1 parent 49c150f commit 8c3914a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Doc/library/importlib.rst
Expand Up @@ -1473,7 +1473,7 @@ an :term:`importer`.

If **name** has no leading dots, then **name** is simply returned. This
allows for usage such as
``importlib.util.resolve_name('sys', __package__)`` without doing a
``importlib.util.resolve_name('sys', __spec__.parent)`` without doing a
check to see if the **package** argument is needed.

:exc:`ImportError` is raised if **name** is a relative module name but
Expand Down
@@ -0,0 +1,2 @@
Updated importlib.utils.resolve_name() doc to use __spec__.parent instead of
__package__. (Thanks Yair Frid.)

0 comments on commit 8c3914a

Please sign in to comment.