Skip to content

Commit

Permalink
Add 3.9.13 PyPy 3.9 & get ready for release 6.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed May 19, 2022
1 parent 88d00fb commit 12ea00f
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 4 deletions.
14 changes: 13 additions & 1 deletion NEWS.md
@@ -1,4 +1,16 @@
6.0.2 2021-11-05
6.0.4 2022-05-19 HF+LB-1
========================

* Detect 3.7.[7-13], 3.9.[8-13], 3.10.[1-4], PyPy 2.7.12, 3.[8-9]pypy
* Correct line-number detection on Python 1.0-1.4
* Handle SET_LINENO in older pythons
* Warn about wrong names in after RESERVE_FAST in older Pythons
* Some PyPy x-3.9.7 tolerance
* Add Pypy 3.8 support
* Better PyPy 3.6 formatting
* Correct relative jump target calculation in 3.10

6.0.3 2021-11-05
=================

* xasm format fixes
Expand Down
2 changes: 1 addition & 1 deletion admin-tools/pyenv-newest-versions
Expand Up @@ -5,4 +5,4 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
echo "This script should be *sourced* rather than run directly through bash"
exit 1
fi
export PYVERSIONS='3.6.15 pypy3.6-7.3.0 3.7.12 pypy3.7-7.3.9 pypy3.8-7.3.9 pypy3.9-7.3.8 pyston-2.3.2 3.7.13 3.8.13 3.9.12 3.10.4'
export PYVERSIONS='3.6.15 pypy3.6-7.3.1 3.7.13 pypy3.7-7.3.9 pypy3.8-7.3.9 pypy3.9-7.3.8 pyston-2.3.3 3.8.13 3.9.13 3.10.4'
2 changes: 1 addition & 1 deletion xdis/magics.py
Expand Up @@ -430,7 +430,7 @@ def add_canonic_versions(versions, canonic):
"3.9 3.9.0 3.9.0a1+ 3.9.0a2+ 3.9.0alpha1 3.9.0alpha2", "3.9.0alpha1"
)
add_canonic_versions(
"3.9 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9 3.9.10 3.9.11 3.9.12 "
"3.9 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9 3.9.10 3.9.11 3.9.12 3.9.13 "
"3.9.10pypy 3.9.11pypy 3.9.12pypy 3.9.0b5+", "3.9.0beta5"
)

Expand Down
2 changes: 2 additions & 0 deletions xdis/op_imports.py
Expand Up @@ -54,6 +54,7 @@
from xdis.opcodes import opcode_36pypy as opcode_36pypy
from xdis.opcodes import opcode_37pypy as opcode_37pypy
from xdis.opcodes import opcode_38pypy as opcode_38pypy
from xdis.opcodes import opcode_39pypy as opcode_39pypy

from xdis.version_info import IS_PYPY, version_tuple_to_str

Expand Down Expand Up @@ -144,6 +145,7 @@
"3.8.0pypy": opcode_38pypy,
"3.8.12pypy": opcode_38pypy,
"3.8.13pypy": opcode_38pypy,
"3.9pypy": opcode_39pypy,
}

for k, v in canonic_python_version.items():
Expand Down
84 changes: 84 additions & 0 deletions xdis/opcodes/opcode_39pypy.py
@@ -0,0 +1,84 @@
# (C) Copyright 2022 by Rocky Bernstein
"""
PYPY 3.9 opcodes
This is a like Python 3.8's opcode.py with some classification
of stack usage.
"""

from xdis.opcodes.base import (
format_CALL_FUNCTION_pos_name_encoded,
def_op,
extended_format_ATTR,
extended_format_RAISE_VARARGS_older,
extended_format_RETURN_VALUE,
finalize_opcodes,
format_RAISE_VARARGS_older,
format_extended_arg,
init_opdata,
jrel_op,
name_op,
nargs_op,
rm_op,
update_pj3,
varargs_op,
)

from xdis.opcodes.opcode_37pypy import (
extended_format_CALL_METHOD,
extended_format_CALL_METHOD_KW,
format_CALL_METHOD,
format_CALL_METHOD_KW,
)

version = 3.9
version_tuple = (3, 9)
python_implementation = "PyPy"

from xdis.opcodes.opcode_33 import extended_format_MAKE_FUNCTION
import xdis.opcodes.opcode_39 as opcode_39
from xdis.opcodes.opcode_37 import format_MAKE_FUNCTION_flags

l = locals()
init_opdata(l, opcode_39, version_tuple, is_pypy=True)


# fmt: off
rm_op(l, "ROT_FOUR", 6)
rm_op(l, "LOAD_METHOD", 160)

# PyPy only
# ----------

name_op(l, "LOOKUP_METHOD", 201, 1, 2)
l["hasvargs"].append(202)
nargs_op(l, "CALL_METHOD_KW", 204, -1, 1)

# Used only in single-mode compilation list-comprehension generators
jrel_op(l, 'SETUP_EXCEPT', 121, 0, 6, conditional=True) # ""
varargs_op(l, "BUILD_LIST_FROM_ARG", 203)
def_op(l, "LOAD_REVDB_VAR", 205)


# fmt: on
opcode_arg_fmt = {
"CALL_FUNCTION": format_CALL_FUNCTION_pos_name_encoded,
"CALL_METHOD": format_CALL_METHOD,
"CALL_METHOD_KW": format_CALL_METHOD_KW,
"EXTENDED_ARG": format_extended_arg,
"MAKE_FUNCTION": format_MAKE_FUNCTION_flags,
"RAISE_VARARGS": format_RAISE_VARARGS_older,
}

opcode_extended_fmt = {
"CALL_METHOD": extended_format_CALL_METHOD,
"CALL_METHOD_KW": extended_format_CALL_METHOD_KW,
"LOAD_ATTR": extended_format_ATTR,
"MAKE_FUNCTION": extended_format_MAKE_FUNCTION,
"RAISE_VARARGS": extended_format_RAISE_VARARGS_older,
"RETURN_VALUE": extended_format_RETURN_VALUE,
"STORE_ATTR": extended_format_ATTR,
}

update_pj3(globals(), l)
finalize_opcodes(l)
2 changes: 1 addition & 1 deletion xdis/version.py
Expand Up @@ -4,4 +4,4 @@
# well as importing into Python. That's why there is no
# space around "=" below.
# fmt: off
__version__="6.0.4.dev0" # noqa
__version__="6.0.4" # noqa

0 comments on commit 12ea00f

Please sign in to comment.