mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Teach Tools/freeze/makeconfig.py and Tools/freeze/parsesetup.py to use
the re package rather than the obsolete regex.
This commit is contained in:
parent
0f33604e17
commit
1bb515b0e5
2 changed files with 12 additions and 10 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import regex
|
||||
import re
|
||||
|
||||
|
||||
# Write the config.c file
|
||||
|
|
@ -6,8 +6,8 @@ import regex
|
|||
never = ['marshal', '__main__', '__builtin__', 'sys', 'exceptions']
|
||||
|
||||
def makeconfig(infp, outfp, modules, with_ifdef=0):
|
||||
m1 = regex.compile('-- ADDMODULE MARKER 1 --')
|
||||
m2 = regex.compile('-- ADDMODULE MARKER 2 --')
|
||||
m1 = re.compile('-- ADDMODULE MARKER 1 --')
|
||||
m2 = re.compile('-- ADDMODULE MARKER 2 --')
|
||||
while 1:
|
||||
line = infp.readline()
|
||||
if not line: break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue