From: Brett Cannon Date: Sun, 11 May 2008 22:47:58 +0000 (+0000) Subject: Remove the sre module. X-Git-Tag: v3.0b1~381 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf3520c2bf7a50fdd2e0251f435c9ebce180cfd2;p=python Remove the sre module. --- diff --git a/Lib/sre.py b/Lib/sre.py deleted file mode 100644 index c04576bafa..0000000000 --- a/Lib/sre.py +++ /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 diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index 7aa69969c1..11677f35f5 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -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) diff --git a/Misc/NEWS b/Misc/NEWS index 47eb5c2f2e..c3d9cc5219 100644 --- 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.