Add more detail about how to handle modules that are renamed.
This commit is contained in:
parent
b9a095d174
commit
9aa01f87f7
|
@ -895,7 +895,12 @@ directory. This facility prevents naming conflicts on
|
|||
case-insensitive filesystems where only the case of a module's name
|
||||
changed.
|
||||
|
||||
The stub modules will import the module code based on the new names.
|
||||
The stub modules will import the module code based on the new names::
|
||||
|
||||
from sys import modules
|
||||
import new_name
|
||||
modules[__name__] = new_name
|
||||
|
||||
As with modules to be removed in 3.0 but not in 2.x,
|
||||
``DeprecationWarning`` will be raised using the ``warnings.warn3k()``
|
||||
function.
|
||||
|
|
Loading…
Reference in New Issue