You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
Merge branch 'master' into python-3.3-to-3.5
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
PYTHON_VERSION=3.7.14
|
PYTHON_VERSION=3.7.16
|
||||||
|
|
||||||
function checkout_version {
|
function checkout_version {
|
||||||
local repo=$1
|
local repo=$1
|
||||||
|
@@ -6,4 +6,4 @@ pytest
|
|||||||
Click~=7.0
|
Click~=7.0
|
||||||
xdis>=6.0.4
|
xdis>=6.0.4
|
||||||
configobj~=5.0.6
|
configobj~=5.0.6
|
||||||
setuptools~=65.3.0
|
setuptools~=65.5.1
|
||||||
|
@@ -199,7 +199,7 @@ class PythonParser(GenericASTBuilder):
|
|||||||
if instructions[finish].linestart:
|
if instructions[finish].linestart:
|
||||||
break
|
break
|
||||||
pass
|
pass
|
||||||
if start > 0:
|
if start >= 0:
|
||||||
err_token = instructions[index]
|
err_token = instructions[index]
|
||||||
print("Instruction context:")
|
print("Instruction context:")
|
||||||
for i in range(start, finish):
|
for i in range(start, finish):
|
||||||
|
@@ -624,10 +624,19 @@ class Scanner3(Scanner):
|
|||||||
pos_args, name_pair_args, annotate_args = parse_fn_counts(
|
pos_args, name_pair_args, annotate_args = parse_fn_counts(
|
||||||
inst.argval
|
inst.argval
|
||||||
)
|
)
|
||||||
|
|
||||||
|
correct_annotate_args = annotate_args
|
||||||
|
if opname in ("MAKE_CLOSURE", "MAKE_FUNCTION") and ((3, 4) <= self.version < (3, 6)) and annotate_args > 0:
|
||||||
|
# For some reason that I don't understand, annotate_args is off by one
|
||||||
|
# when there is an EXENDED_ARG instruction from what is documented in
|
||||||
|
# https://docs.python.org/3.4/library/dis.html#opcode-MAKE_CLOSURE
|
||||||
|
# However in parsing rule, we have already adjusted for the one-fewer annotate arg
|
||||||
|
correct_annotate_args -= 1
|
||||||
|
|
||||||
pattr = "%d positional, %d keyword only, %d annotated" % (
|
pattr = "%d positional, %d keyword only, %d annotated" % (
|
||||||
pos_args,
|
pos_args,
|
||||||
name_pair_args,
|
name_pair_args,
|
||||||
annotate_args,
|
correct_annotate_args,
|
||||||
)
|
)
|
||||||
if name_pair_args > 0:
|
if name_pair_args > 0:
|
||||||
# FIXME: this should probably be K_
|
# FIXME: this should probably be K_
|
||||||
|
@@ -14,4 +14,4 @@
|
|||||||
# This file is suitable for sourcing inside POSIX shell as
|
# This file is suitable for sourcing inside POSIX shell as
|
||||||
# well as importing into Python
|
# well as importing into Python
|
||||||
# fmt: off
|
# fmt: off
|
||||||
__version__="3.9.0" # noqa
|
__version__="3.9.1.dev0" # noqa
|
||||||
|
Reference in New Issue
Block a user