self.opc.version -> self.opc.version_tuple

The next release of xdis will no longer support self.opc.version (a
float value which doesn't work in the presense of 3.10 and above)
This commit is contained in:
rocky 2023-01-18 17:08:39 -05:00
parent 2b3cd696db
commit 931abc5726

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016-2021 by Rocky Bernstein
# Copyright (c) 2016-2021, 2023 by Rocky Bernstein
# Copyright (c) 2000-2002 by hartmut Goebel <h.goebel@crazy-compilers.com>
# Copyright (c) 1999 John Aycock
#
@ -180,7 +180,7 @@ class Token:
elif name == "LOAD_ASSERT":
return "%s%s %s" % (prefix, offset_opname, pattr)
elif self.op in self.opc.NAME_OPS:
if self.opc.version >= 3.0:
if self.opc.version_tuple >= (3, 0):
return "%s%s%s %s" % (prefix, offset_opname, argstr, self.attr)
elif name == "EXTENDED_ARG":
return "%s%s%s 0x%x << %s = %s" % (