Merge branch 'master' into python-2.4

This commit is contained in:
rocky
2017-12-03 12:29:05 -05:00
3 changed files with 74 additions and 52 deletions

View File

@@ -11,7 +11,8 @@ typeset -i STOP_ONERROR=1
typeset -A SKIP_TESTS
case $PYVERSION in
2.4)
SKIP_TESTS=( [test_binop.py]=1 # need to fix tryelse
SKIP_TESTS=(
[test_binop.py]=1 # need to fix tryelse
[test_cgi.py]=1 # need to fix tryelse
[test_codecs.py]=1 # need to fix tryelse
[test_decorators.py]=1 # Syntax error decorators?
@@ -45,18 +46,38 @@ case $PYVERSION in
[test_sax.py]=1 # Control flow?
[test_types.py]=1 # Control flow?
)
;;
2.6)
SKIP_TESTS=( [test_array.py]=1 [test_asyncore.py]=1)
SKIP_TESTS=(
[test_binop.py]=1 # need to fix tryelse
[test_cmath.py]=1 # Control flow?
[test_codecs.py]=1 # need to fix tryelse
[test_coercion.py]=1 # Control flow?
[test_cookielib.py]=1 # Control flow?
[test_contextlib.py]=1 # decorators
[test_decorators.py]=1 # decorators
[test_enumerate.py]=1 # Control flow?
[test_file.py]=1 # Control flow?
[test_format.py]=1 # Control flow?
[test_frozen.py]=1 # Control flow?
[test_ftplib.py]=1 # Control flow?
[test_funcattrs.py]=1 # Control flow?
[test_future4.py]=1 # Possible additional rule for future mechanism?
[test_grammar.py]=1 # Syntax error -- look at
[test_grp.py]=1 # Long test - might work Control flow?
[test_pwd.py]=1 # Long test - might work? Control flow?
[test_queue.py]=1 # Control flow?
)
;;
2.7)
SKIP_TESTS=(
[test_builtin.py]=1
[test_contextlib.py]=1 # decorators
[test_decorators.py]=1 # decorators
[test_decimal.py]=1
[test_descr.py]=1 # syntax error look at
[test_dis.py]=1 # We change line numbers - duh!
[test_future4.py]=1 # Possible additional rule for future mechanism?
[test_grammar.py]=1 # Long test look at
[test_importlib.py]=1 # Control flow?
)
;;
*)

View File

@@ -155,7 +155,7 @@ TABLE_DIRECT = {
'unpack_w_parens': ( '(%C%,)', (1, maxint, ', ') ),
# This nonterminal we create on the fly in semantic routines
'load_attr': ( '(%c).%[1]{pattr}',
'load_attr_w_parens': ( '(%c).%[1]{pattr}',
(0, 'expr')),
'unpack_list': ( '[%C]',

View File

@@ -1879,7 +1879,8 @@ class SourceWalker(GenericASTTraversal, object):
n_unpack_w_parens = n_unpack
def n_load_attr(self, node):
if node[0] == 'LOAD_CONST':
if (node[0] == 'LOAD_CONST' or
node[0] == 'expr' and node[0][0] == 'LOAD_CONST'):
node.kind = 'load_attr_w_parens'
self.default(node)