mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
#13301: merge with 3.3.
This commit is contained in:
commit
90378b4807
2 changed files with 9 additions and 3 deletions
|
@ -316,6 +316,12 @@ Build
|
||||||
- Issue #15819: Make sure we can build Python out-of-tree from a read-only
|
- Issue #15819: Make sure we can build Python out-of-tree from a read-only
|
||||||
source directory. (Somewhat related to issue #9860.)
|
source directory. (Somewhat related to issue #9860.)
|
||||||
|
|
||||||
|
Tools/Demos
|
||||||
|
-----------
|
||||||
|
|
||||||
|
- Issue #13301: use ast.literal_eval() instead of eval() in Tools/i18n/msgfmt.py
|
||||||
|
Patch by Serhiy Storchaka.
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,9 @@ Options:
|
||||||
Display version information and exit.
|
Display version information and exit.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
import ast
|
||||||
import getopt
|
import getopt
|
||||||
import struct
|
import struct
|
||||||
import array
|
import array
|
||||||
|
@ -180,8 +181,7 @@ def make(filename, outfile):
|
||||||
l = l.strip()
|
l = l.strip()
|
||||||
if not l:
|
if not l:
|
||||||
continue
|
continue
|
||||||
# XXX: Does this always follow Python escape semantics?
|
l = ast.literal_eval(l)
|
||||||
l = eval(l)
|
|
||||||
if section == ID:
|
if section == ID:
|
||||||
msgid += l.encode(encoding)
|
msgid += l.encode(encoding)
|
||||||
elif section == STR:
|
elif section == STR:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue