File tree 3 files changed +13
-1
lines changed
3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 8
8
9
9
from re import *
10
10
from re import __all__
11
+
12
+ # old pickles expect the _compile() reconstructor in this module
13
+ from re import _compile
Original file line number Diff line number Diff line change 1
1
import sys
2
2
sys .path = ['.' ] + sys .path
3
3
4
- from test .test_support import verbose , run_unittest
4
+ from test .test_support import verbose , run_unittest , guard_warnings_filter
5
5
import re
6
6
from re import Scanner
7
7
import sys , os , traceback
@@ -414,6 +414,12 @@ def test_pickling(self):
414
414
self .pickle_test (pickle )
415
415
import cPickle
416
416
self .pickle_test (cPickle )
417
+ # old pickles expect the _compile() reconstructor in sre module
418
+ import warnings
419
+ with guard_warnings_filter ():
420
+ warnings .filterwarnings ("ignore" , "The sre module is deprecated" ,
421
+ DeprecationWarning )
422
+ from sre import _compile
417
423
418
424
def pickle_test (self , pickle ):
419
425
oldpat = re .compile ('a(?:b|(c|e){1,2}?|d)+?(.)' )
Original file line number Diff line number Diff line change @@ -192,6 +192,9 @@ Core and builtins
192
192
Library
193
193
-------
194
194
195
+ - Bug #1675967: re patterns pickled with Python 2.4 and earlier can
196
+ now be unpickled with Python 2.5 and newer.
197
+
195
198
- Patch #1630118: add a SpooledTemporaryFile class to tempfile.py.
196
199
197
200
- Patch #1273829: os.walk() now has a "followlinks" parameter. If set to
You can’t perform that action at this time.
0 commit comments