mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #15610: The PyImport_ImportModuleEx macro now calls
PyImport_ImportModuleLevel() with a 'level' of 0 instead of -1 as the latter is no longer a valid value. Also added a versionchanged note for PyImport_ImportModuleLevel() just in case people don't make the connection between changes to __import__() and this C function.
This commit is contained in:
parent
f410ce8c09
commit
522267e784
4 changed files with 13 additions and 3 deletions
|
@ -44,8 +44,7 @@ Importing Modules
|
|||
.. index:: builtin: __import__
|
||||
|
||||
Import a module. This is best described by referring to the built-in Python
|
||||
function :func:`__import__`, as the standard :func:`__import__` function calls
|
||||
this function directly.
|
||||
function :func:`__import__`.
|
||||
|
||||
The return value is a new reference to the imported module or top-level
|
||||
package, or *NULL* with an exception set on failure. Like for
|
||||
|
@ -76,6 +75,9 @@ Importing Modules
|
|||
Similar to :c:func:`PyImport_ImportModuleLevelObject`, but the name is an
|
||||
UTF-8 encoded string instead of a Unicode object.
|
||||
|
||||
.. versionchanged:: 3.3
|
||||
Negative values for **level** are no longer accepted.
|
||||
|
||||
.. c:function:: PyObject* PyImport_Import(PyObject *name)
|
||||
|
||||
This is a higher-level interface that calls the current "import hook
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue