changeset: 99431:567baf74ebad branch: 3.5 parent: 99429:e9aeae1b2ea9 user: Brett Cannon date: Fri Dec 04 14:51:26 2015 -0800 files: Doc/reference/import.rst Misc/NEWS description: Issue #25500: Fix the language reference to not claim that import statements search for __import__ in the global scope. Thanks to Sergei Lebedev for finding the documentation bug. diff -r e9aeae1b2ea9 -r 567baf74ebad Doc/reference/import.rst --- a/Doc/reference/import.rst Thu Dec 03 17:31:24 2015 -0800 +++ b/Doc/reference/import.rst Fri Dec 04 14:51:26 2015 -0800 @@ -29,11 +29,10 @@ a name binding operation. When calling :func:`__import__` as part of an import statement, the -import system first checks the module global namespace for a function by -that name. If it is not found, then the standard builtin :func:`__import__` -is called. Other mechanisms for invoking the import system (such as -:func:`importlib.import_module`) do not perform this check and will always -use the standard import system. +standard builtin :func:`__import__` is called. Other mechanisms for +invoking the import system (such as :func:`importlib.import_module`) may +choose to subvert :func:`__import__` and use its own solution to +implement import semantics. When a module is first imported, Python searches for the module and if found, it creates a module object [#fnmo]_, initializing it. If the named module diff -r e9aeae1b2ea9 -r 567baf74ebad Misc/NEWS --- a/Misc/NEWS Thu Dec 03 17:31:24 2015 -0800 +++ b/Misc/NEWS Fri Dec 04 14:51:26 2015 -0800 @@ -54,6 +54,12 @@ - Issue #25624: ZipFile now always writes a ZIP_STORED header for directory entries. Patch by Dingyuan Wang. +Documentation +------------- + +- Issue #25500: Fix documentation to not claim that __import__ is searched for + in the global scope. + Tests -----