Merge branch 'python-3.6-to-3.10' into python-3.3-to-3.5

This commit is contained in:
rocky
2024-12-12 18:06:33 -05:00
7 changed files with 8 additions and 14 deletions

View File

@@ -1,11 +0,0 @@
default_language_version:
python: python
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-merge-conflict
- id: debug-statements
stages: [commit]
- id: end-of-file-fixer
stages: [commit]

View File

@@ -17,7 +17,7 @@ cd $mydir
(cd $fulldir/.. && \
setup_version python-spark python-2.4 && \
setup_verseion python-xdis python-2.4-to-2.7)
setup_version python-xdis python-2.4-to-2.7)
checkout_finish python-2.4-to-2.7

Binary file not shown.

Binary file not shown.

View File

@@ -391,6 +391,10 @@ class PythonParser(GenericASTBuilder):
returns ::= return
returns ::= _stmts return
# NOP
stmt ::= nop_stmt
nop_stmt ::= NOP
"""
pass

View File

@@ -17,7 +17,7 @@
import re
from uncompyle6.semantics.consts import INDENT_PER_LEVEL, PRECEDENCE, TABLE_DIRECT
from uncompyle6.semantics.consts import INDENT_PER_LEVEL, PRECEDENCE
from uncompyle6.semantics.helper import flatten_list
# FIXME get from a newer xdis

View File

@@ -1216,6 +1216,7 @@ class SourceWalker(GenericASTTraversal, NonterminalActions, ComprehensionMixin):
is_lambda=False,
noneInNames=False,
is_top_level_module=False,
compile_mode="exec",
) -> GenericASTTraversal:
# FIXME: DRY with fragments.py
@@ -1266,7 +1267,6 @@ class SourceWalker(GenericASTTraversal, NonterminalActions, ComprehensionMixin):
load_const.kind == "LOAD_CONST"
and load_const.linestart is None
and load_const.attr is None
or is_top_level_module
):
# Delete LOAD_CONST (None) RETURN_VALUE
del tokens[-2:]
@@ -1375,6 +1375,7 @@ def code_deparse(
co,
is_lambda=is_lambda_mode(compile_mode),
is_top_level_module=is_top_level_module,
compile_mode=compile_mode,
)
# XXX workaround for profiling