]> granicus.if.org Git - python/commitdiff
Remove the sre module.
authorBrett Cannon <bcannon@gmail.com>
Sun, 11 May 2008 22:47:58 +0000 (22:47 +0000)
committerBrett Cannon <bcannon@gmail.com>
Sun, 11 May 2008 22:47:58 +0000 (22:47 +0000)
Lib/sre.py [deleted file]
Lib/test/test_re.py
Misc/NEWS

diff --git a/Lib/sre.py b/Lib/sre.py
deleted file mode 100644 (file)
index c04576b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-"""This file is only retained for backwards compatibility.
-It will be removed in the future.  sre was moved to re in version 2.5.
-"""
-
-import warnings
-warnings.warn("The sre module is deprecated, please import re.",
-              DeprecationWarning, 2)
-
-from re import *
-from re import __all__
-
-# old pickles expect the _compile() reconstructor in this module
-from re import _compile
index 7aa69969c189098283fedf5d5b4f83376721dffe..11677f35f5e7a265d18796062cbf423ad2bfa96a 100644 (file)
@@ -434,16 +434,6 @@ class ReTests(unittest.TestCase):
         self.assertEqual(pat.match(p) is not None, True)
         self.assertEqual(pat.match(p).span(), (0,256))
 
-    def test_pickling(self):
-        import pickle
-        self.pickle_test(pickle)
-        # old pickles expect the _compile() reconstructor in sre module
-        import warnings
-        with catch_warning():
-            warnings.filterwarnings("ignore", "The sre module is deprecated",
-                                    DeprecationWarning)
-            from sre import _compile
-
     def pickle_test(self, pickle):
         oldpat = re.compile('a(?:b|(c|e){1,2}?|d)+?(.)')
         s = pickle.dumps(oldpat)
index 47eb5c2f2e9f7779a0d9543b67a7b54bea8a1bf8..c3d9cc5219142e311d684993ba7bd64be8f9c424 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -21,6 +21,8 @@ Extension Modules
 Library
 -------
 
+- The sre module has been removed.
+
 - The PixMapWrapper module has been renamed to pixmapwrapper.
 
 - The Queue module has been renamed to queue.