]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Deprecate the user module for removal in 3.0.
authorBrett Cannon <bcannon@gmail.com>
Thu, 8 May 2008 20:36:09 +0000 (20:36 +0000)
committerBrett Cannon <bcannon@gmail.com>
Thu, 8 May 2008 20:36:09 +0000 (20:36 +0000)
Doc/library/user.rst
Lib/test/test_py3kwarn.py
Lib/user.py
Misc/NEWS

index aa09b67278c6ef81660504f459e3a9aba717c503..4fdd9cf4da34b6bdbf2070a0abc58d323c4da8ef 100644 (file)
@@ -4,7 +4,9 @@
 
 .. module:: user
    :synopsis: A standard way to reference user-specific modules.
+   :deprecated:
 
+.. deprecated:: The user module has been removed in Python 3.0.
 
 .. index::
    pair: .pythonrc.py; file
index 7e284e5a3f6186bc5289c73eb40cf4ce7d446f00..ab8e3168bdd185fbaa999e9ea4f53602f32b7655 100644 (file)
@@ -126,7 +126,7 @@ class TestPy3KWarnings(unittest.TestCase):
 
 class TestStdlibRemovals(unittest.TestCase):
 
-    all_platforms = ('audiodev', 'imputil', 'mutex')
+    all_platforms = ('audiodev', 'imputil', 'mutex', 'user')
 
     def check_removal(self, module_name):
         """Make sure the specified module, when imported, raises a
index e550e52ad807a413c9cef994da690635c19052c6..596f0a74628eaa144a6437fec644a2d00df4a392 100644 (file)
@@ -20,6 +20,9 @@ The user's .pythonrc.py could conceivably test for sys.version if it
 wishes to do different things depending on the Python version.
 
 """
+from warnings import warnpy3k
+warnpy3k("the user module has been removed in Python 3.0", stacklevel=2)
+del warnpy3k
 
 import os
 
index d51e1281bd5bafd27914931898aa995ffa52996b..5c7d304c53aa6d0729f2a3014e7ae9104f154e6a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -20,6 +20,8 @@ Extension Modules
 Library
 -------
 
+- The user module has been deprecated for removal in Python 3.0.
+
 - The stringold module has been deprecated for removal in Python 3.0.
 
 - The mutex module has been deprecated for removal in Python 3.0.