Commit b8858216 authored by Brett Cannon's avatar Brett Cannon

Remove the sre module.

parent 1f9c2bf4
"""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
...@@ -434,16 +434,6 @@ class ReTests(unittest.TestCase): ...@@ -434,16 +434,6 @@ class ReTests(unittest.TestCase):
self.assertEqual(pat.match(p) is not None, True) self.assertEqual(pat.match(p) is not None, True)
self.assertEqual(pat.match(p).span(), (0,256)) 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): def pickle_test(self, pickle):
oldpat = re.compile('a(?:b|(c|e){1,2}?|d)+?(.)') oldpat = re.compile('a(?:b|(c|e){1,2}?|d)+?(.)')
s = pickle.dumps(oldpat) s = pickle.dumps(oldpat)
......
...@@ -21,6 +21,8 @@ Extension Modules ...@@ -21,6 +21,8 @@ Extension Modules
Library Library
------- -------
- The sre module has been removed.
- The PixMapWrapper module has been renamed to pixmapwrapper. - The PixMapWrapper module has been renamed to pixmapwrapper.
- The Queue module has been renamed to queue. - The Queue module has been renamed to queue.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment