]> granicus.if.org Git - python/commitdiff
Renamed the repr module to reprlib.
authorAlexandre Vassalotti <alexandre@peadrop.com>
Fri, 16 May 2008 06:37:57 +0000 (06:37 +0000)
committerAlexandre Vassalotti <alexandre@peadrop.com>
Fri, 16 May 2008 06:37:57 +0000 (06:37 +0000)
Added stub module for repr.

Lib/lib-old/repr.py [new file with mode: 0644]
Lib/reprlib.py [moved from Lib/repr.py with 100% similarity]
Lib/test/test_py3kwarn.py
Misc/NEWS

diff --git a/Lib/lib-old/repr.py b/Lib/lib-old/repr.py
new file mode 100644 (file)
index 0000000..daa2154
--- /dev/null
@@ -0,0 +1,7 @@
+from warnings import warnpy3k
+warnpy3k("The repr module has been renamed to 'reprlib' in Python 3.0",
+         stacklevel=2)
+
+from sys import modules
+import reprlib
+modules[__name__] = repr
similarity index 100%
rename from Lib/repr.py
rename to Lib/reprlib.py
index 6864dae74bdc73328ffef210880b469a9c4c8c77..857810a45c1756fb89f12ae7e11d355d493d5d95 100644 (file)
@@ -210,7 +210,9 @@ class TestStdlibRenames(unittest.TestCase):
 
     renames = {'copy_reg': 'copyreg', 'Queue': 'queue',
                'SocketServer': 'socketserver',
-               'ConfigParser': 'configparser'}
+               'ConfigParser': 'configparser',
+               'repr': 'reprlib',
+               }
 
     def check_rename(self, module_name, new_module_name):
         """Make sure that:
index 328728041929f326a48d855a02b9af43a990eef0..ea4ba1ad6d5905fb5fb610756c3419032eb5277a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,9 @@ Extension Modules
 Library
 -------
 
+- The repr module has been renamed 'reprlib'.  The old name is now
+  deprecated.
+
 - The statvfs module has been deprecated for removal in Python 3.0.
 
 - The sunaudiodev and SUNAUDIODEV modules have been deprecated for removal in