Add more detail about how to handle modules that are renamed.

This commit is contained in:
Brett Cannon 2008-04-29 21:46:32 +00:00
parent b9a095d174
commit 9aa01f87f7
1 changed files with 6 additions and 1 deletions

View File

@ -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.