diff options
author | Alexandre Vassalotti <alexandre@peadrop.com> | 2008-05-16 06:37:57 (GMT) |
---|---|---|
committer | Alexandre Vassalotti <alexandre@peadrop.com> | 2008-05-16 06:37:57 (GMT) |
commit | 95d97c7390beb72083dac5a801cadfb4c1379fe5 (patch) | |
tree | c8d721828711e47fa02081e2a71768ad68799fd7 /Lib | |
parent | 5915a4dcfebf74d0a2c99848ede619f5bf7d2899 (diff) | |
download | cpython-95d97c7390beb72083dac5a801cadfb4c1379fe5.zip cpython-95d97c7390beb72083dac5a801cadfb4c1379fe5.tar.gz cpython-95d97c7390beb72083dac5a801cadfb4c1379fe5.tar.bz2 |
Renamed the repr module to reprlib.
Added stub module for repr.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/lib-old/repr.py | 7 | ||||
-rw-r--r-- | Lib/reprlib.py (renamed from Lib/repr.py) | 0 | ||||
-rw-r--r-- | Lib/test/test_py3kwarn.py | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/Lib/lib-old/repr.py b/Lib/lib-old/repr.py new file mode 100644 index 0000000..daa2154 --- /dev/null +++ b/Lib/lib-old/repr.py @@ -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 diff --git a/Lib/repr.py b/Lib/reprlib.py index 3c26cc3..3c26cc3 100644 --- a/Lib/repr.py +++ b/Lib/reprlib.py diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py index 6864dae..857810a 100644 --- a/Lib/test/test_py3kwarn.py +++ b/Lib/test/test_py3kwarn.py @@ -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: |