From 6c26f3fb8d29ee4565e35fa6d44cc0fee9393de0 Mon Sep 17 00:00:00 2001 From: rocky Date: Sat, 24 Feb 2024 18:23:30 -0500 Subject: [PATCH] ADD_VALUE types --- test/stdlib/2.6-exclude.sh | 1 + uncompyle6/semantics/make_function2.py | 11 ++--------- uncompyle6/semantics/n_actions.py | 3 +-- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/test/stdlib/2.6-exclude.sh b/test/stdlib/2.6-exclude.sh index 5b395032..952579a4 100644 --- a/test/stdlib/2.6-exclude.sh +++ b/test/stdlib/2.6-exclude.sh @@ -18,6 +18,7 @@ SKIP_TESTS=( [test_cd.py]=1 # i# No module cl [test_cl.py]=1 # it fails on its own + [test_cmath.py]=pytest [test_codecmaps_cn.py]=1 # it fails on its own [test_codecmaps_jp.py]=1 # it fails on its own [test_codecmaps_kr.py]=1 # it fails on its own diff --git a/uncompyle6/semantics/make_function2.py b/uncompyle6/semantics/make_function2.py index 4d0ee338..6dd8cd07 100644 --- a/uncompyle6/semantics/make_function2.py +++ b/uncompyle6/semantics/make_function2.py @@ -1,4 +1,4 @@ -# Copyright (c) 2015-2021 by Rocky Bernstein +# Copyright (c) 2015-2021 2024 by Rocky Bernstein # Copyright (c) 2000-2002 by hartmut Goebel # # This program is free software: you can redistribute it and/or modify @@ -17,24 +17,17 @@ All the crazy things we have to do to handle Python functions in Python before 3.0. The saga of changes continues in 3.0 and above and in other files. """ -from itertools import zip_longest - from xdis import code_has_star_arg, code_has_star_star_arg, iscode -from uncompyle6.parser import ParserError as ParserError2 from uncompyle6.scanner import Code from uncompyle6.semantics.helper import ( find_all_globals, find_globals_and_nonlocals, find_none, print_docstring, - zip_longest -) -from xdis import iscode, code_has_star_arg, code_has_star_star_arg - + zip_longest, ) from uncompyle6.semantics.parser_error import ParserError -from uncompyle6.show import maybe_show_tree_param_default def make_function2(self, node, is_lambda, nested=1, code_node=None): diff --git a/uncompyle6/semantics/n_actions.py b/uncompyle6/semantics/n_actions.py index 2513d643..e0b0b4f5 100644 --- a/uncompyle6/semantics/n_actions.py +++ b/uncompyle6/semantics/n_actions.py @@ -277,9 +277,8 @@ class NonterminalActions: value = elem.attr elif elem.optype == "const" and not isinstance(elem.attr, str): value = elem.attr ->>>>>>> python-3.0-to-3.2 else: - value = "%s" % repr(elem.attr) + value = "%s" % repr(elem.pattr) else: assert elem.kind == "ADD_VALUE_VAR" value = "%s" % elem.pattr