Skip to content

Commit e3d918d

Browse files
committed
Allow Python 3.0 and fix default param bug in 3.0
1 parent e7b62a7 commit e3d918d

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

__pkginfo__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
'Programming Language :: Python :: 2.5',
3636
'Programming Language :: Python :: 2.6',
3737
'Programming Language :: Python :: 2.7',
38+
'Programming Language :: Python :: 3.0',
3839
'Programming Language :: Python :: 3.1',
3940
'Programming Language :: Python :: 3.2',
4041
'Programming Language :: Python :: 3.3',
@@ -56,7 +57,7 @@
5657
]}
5758
ftp_url = None
5859
install_requires = ['spark-parser >= 1.8.5, < 1.9.0',
59-
'xdis >= 3.8.2, < 3.9.0', 'six']
60+
'xdis >= 3.8.2, < 3.9.0']
6061

6162
license = 'GPL3'
6263
mailing_list = 'python-debugger@googlegroups.com'

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
"""Setup script for the 'uncompyle6' distribution."""
55

66
SYS_VERSION = sys.version_info[0:2]
7-
if not ((2, 6) <= SYS_VERSION <= (3, 7)) or ((3, 0) <= SYS_VERSION <= (3, 0)):
8-
mess = "Python Release 2.6 .. 3.7 excluding 3.0 are supported in this code branch."
7+
if not ((2, 6) <= SYS_VERSION <= (3, 7)):
8+
mess = "Python Release 2.6 .. 3.7 are supported in this code branch."
99
if ((2, 4) <= SYS_VERSION <= (2, 7)):
1010
mess += ("\nFor your Python, version %s, use the python-2.4 code/branch." %
1111
sys.version[0:3])
12-
elif SYS_VERSION < (2, 4) or (3, 0) <= SYS_VERSION:
12+
elif SYS_VERSION < (2, 4):
1313
mess += ("\nThis package is not supported for Python version %s."
1414
% sys.version[0:3])
1515
print(mess)

uncompyle6/bin/uncompile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ def usage():
6969

7070

7171
def main_bin():
72-
if not (sys.version_info[0:2] in ((2, 6), (2, 7),
72+
if not (sys.version_info[0:2] in ((2, 6), (2, 7), (3, 0),
7373
(3, 1), (3, 2), (3, 3),
7474
(3, 4), (3, 5), (3, 6),
7575
(3, 7)
7676
)):
77-
print('Error: %s requires Python 2.6-2.7, or 3.1-3.7' % program,
77+
print('Error: %s requires Python 2.6-3.7' % program,
7878
file=sys.stderr)
7979
sys.exit(-1)
8080

uncompyle6/semantics/make_function.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -591,8 +591,9 @@ def build_param(ast, name, default):
591591
paramnames = list(scanner_code.co_varnames[:argc])
592592

593593
# defaults are for last n parameters, thus reverse
594-
if not 3.0 == self.version or self.version >= 3.6:
595-
paramnames.reverse(); defparams.reverse()
594+
if self.version < 3.6:
595+
paramnames.reverse();
596+
defparams.reverse()
596597

597598
try:
598599
ast = self.build_ast(scanner_code._tokens,
@@ -621,7 +622,7 @@ def build_param(ast, name, default):
621622
else:
622623
params = paramnames
623624

624-
if not 3.0 == self.version or self.version >= 3.6:
625+
if not 3.1 <= self.version < 3.6:
625626
params.reverse() # back to correct order
626627

627628
if code_has_star_arg(code):

0 commit comments

Comments
 (0)