Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b8858216
Commit
b8858216
authored
May 11, 2008
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the sre module.
parent
1f9c2bf4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
23 deletions
+2
-23
Lib/sre.py
Lib/sre.py
+0
-13
Lib/test/test_re.py
Lib/test/test_re.py
+0
-10
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/sre.py
deleted
100644 → 0
View file @
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
Lib/test/test_re.py
View file @
b8858216
...
...
@@ -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)
...
...
Misc/NEWS
View file @
b8858216
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment