From 9aa01f87f7ad6572c5b9e1f1ee90c022e23acc06 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Tue, 29 Apr 2008 21:46:32 +0000 Subject: [PATCH] Add more detail about how to handle modules that are renamed. --- pep-3108.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pep-3108.txt b/pep-3108.txt index 466ad2863..16e397891 100644 --- a/pep-3108.txt +++ b/pep-3108.txt @@ -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.