File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -316,6 +316,12 @@ Build
316316- Issue #15819: Make sure we can build Python out-of-tree from a read-only
317317 source directory. (Somewhat related to issue #9860.)
318318
319+ Tools/Demos
320+ -----------
321+
322+ - Issue #13301: use ast.literal_eval() instead of eval() in Tools/i18n/msgfmt.py
323+ Patch by Serhiy Storchaka.
324+
319325Documentation
320326-------------
321327
Original file line number Diff line number Diff line change 2424 Display version information and exit.
2525"""
2626
27- import sys
2827import os
28+ import sys
29+ import ast
2930import getopt
3031import struct
3132import array
@@ -180,8 +181,7 @@ def make(filename, outfile):
180181 l = l .strip ()
181182 if not l :
182183 continue
183- # XXX: Does this always follow Python escape semantics?
184- l = eval (l )
184+ l = ast .literal_eval (l )
185185 if section == ID :
186186 msgid += l .encode (encoding )
187187 elif section == STR :
You can’t perform that action at this time.
0 commit comments