[Python-checkins] r62900 - in python/trunk: Doc/library/user.rst Lib/test/test_py3kwarn.py Lib/user.py Misc/NEWS

brett.cannon python-checkins at python.org
Thu May 8 22:36:09 CEST 2008


Author: brett.cannon
Date: Thu May  8 22:36:09 2008
New Revision: 62900

Log:
Deprecate the user module for removal in 3.0.


Modified:
   python/trunk/Doc/library/user.rst
   python/trunk/Lib/test/test_py3kwarn.py
   python/trunk/Lib/user.py
   python/trunk/Misc/NEWS

Modified: python/trunk/Doc/library/user.rst
==============================================================================
--- python/trunk/Doc/library/user.rst	(original)
+++ python/trunk/Doc/library/user.rst	Thu May  8 22:36:09 2008
@@ -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

Modified: python/trunk/Lib/test/test_py3kwarn.py
==============================================================================
--- python/trunk/Lib/test/test_py3kwarn.py	(original)
+++ python/trunk/Lib/test/test_py3kwarn.py	Thu May  8 22:36:09 2008
@@ -126,7 +126,7 @@
 
 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

Modified: python/trunk/Lib/user.py
==============================================================================
--- python/trunk/Lib/user.py	(original)
+++ python/trunk/Lib/user.py	Thu May  8 22:36:09 2008
@@ -20,6 +20,9 @@
 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
 

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Thu May  8 22:36:09 2008
@@ -20,6 +20,8 @@
 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.


More information about the Python-checkins mailing list