- Add Python 3.11 support
- Start using branches to support running on older Pythons
- Use newer xdis
- Revise tests to work more along the lines of decompilers and xdis. This also lets us share test code.
- Add Administrative merge code in support of new branches
- Many bug fixes
- Start to Modernize style, lint, use "black" and "isort"
Some work to allow continuing on Python 3.12 and beyond
- Remove use of nose/nosetest
- Add pyproject.toml
- Better PyPy 3.6-3.8 opcode coverages,
- Better 3.9 opcode coverage
- Start handling Python 3.10
- Add bytecode files and testing for the above.
- Use newer xdis which supports 3.10. We don't have 3.10 opcode interpretation yet though. This was a lot of upheaval since we can no longer use floats to represent python versions: 3.1 == 3.10 in floating point. As xdis uses, we use tuples now.
- Improve fake
version_info
for PyPy. - Start pypy37 and pypy38 bytecodes, although this is not finished yet. You interpret other bytecode from PyPy though.
- Tweak
FORMAT_VALUE
and improve assembly display
- Handle Python 3.7 - 3.9 better
- fake sys.version, sys.version_info, and sys.hexversion in cross interpreting
- Handle PyPy 3.5 and other PyPy's better
- Fix bug in reporting line number
- Fix bug in Python 2.{4,5} MAKE_CLOSURE
- Improve ofrmating on IMPORT_NAME on 2.6 and later
- Type check VM arguments more
Note: a lot of stdlib tests have become broken. This is probably ood because it reflects that we are honestly interpreting more and not running interpreter code as builtin Python functions (e.g. eval and exec used to work this way.)
- Start interpreter assisted breakpoints.
- Fill out interpreter inspect more
- exec is the same as exec
- make version pydoc frendly
- propagate interpreter-caught exceptions more properly
Small changes.
run_eval()
renamed toeval_frame()
to better match the way CPython does itexec()
, andeval()
builtins go throughcompile
andeval_frame()
so they get interpreted- It is okay when
exec()
andeval()
which calleval_frame()
leave data on the stack (?) __module__
property set properly oneval_frame()
pretty_event_flags()
will show VM tracing event flags nicley. This helps trepan-xpy__qualname__
and__name__
are set differently and properly inMAKE_FUNCTION
in 3.4+- More tests and expanded coverage
- Work progress in getting 3.6+
GET_AWAITABLE
done, but more work is needed.
Overall, improved cross-version bytecode interpreting and some bug fixes.
- Correct
BUILD_MAP_UNPACK
opcode handling. - Set namespace locals and globals to the proper namespace in builtin
eval()
like we do forlocals()
andglobals()
built-in functions - Better built-in test for
eval()
. Note Tk has its own built-ineval()
- Handle
__idiv__
in overwritten insdie//=
- Improve argument format for
CALL_FUNCTION_KW
for 3.6+ - Initialize frame cells from closure, not
f_back
See nedbat#17
Overall, some bugs were fixed especially on the 3.6+ side.
There is better cross version interpreting.
Release before we do a major overhaul on the closure or cell "freeops", e.g. LOAD_DEREF
and STORE_DEREF
.
- Fix bug in detecting 3.6+ keyword-only signatures
- Correct bugs in 3.6+
MAKE_FUNCTION
- Improve our build_class(); don't try to convert built-in
__entry__
,__exit__
routines - Add Python 2.4 bytecode interpreting
- Improve logging operator formatting
- Logging often shows the operand that an opcode uses
- Cross-version bytecode interpreting has been improved. Adding inter-operable
inspect
modules helps here. - Support for debugger-like "step over" and "finish" trace commands was added.
1.3.0 was a botched release. xpython.stdlib wasn't included
The main thrust of this release was to make it suitable to be used from a debugger.
- There is better (but not exact) conformance of Python's
sys.settrace()
API:- linestarts is a frame-oriented thing, not a VM thing.
- Store callback in
f_trace
.
- Allow supplying a callback print function, so that the client can colorize the parts of the instruction
- Add screencasts
This version adds callback hooks for tracing or debugger that will be released soon.
There is more complete (but not fully complete) Version 3.5-3.7 bytecode interpretation.
(BUILD_TUPLE_UNPACK_WITH_CALL
implemented 3.6 MAKE_FUNCTION
corrected.)
build_class()
has been fixed so that it picks up class variables. This means we do better at as a cross version interpreter - that's where build_class()
is currently used.
Via build_class()
we can track into __entry__()
and __exit__()
functions of a context manager.
frame.f_lasti
had been pointing to the instruction that might be run next rather than the one that is about to be run. While this simplified interpreter implementation, it didn't follow CPython's meaning. And when this is used from a debugger this becomes unusable.
Disassembly output has been fixed up courtesy of argument information from xdis
. xdis
imports have been simplified in version 4.6.0, so we require that.
Additional PyPy bytecode ops (LOOKUP_METHOD
, CALL_METHOD
) are supported; so you can run this from PyPy now or do cross-interpretation from the corresponding CPython bytecode.
Better conformance of Python's Frame type. Added: __qualname__
and set __annotation__
attributes.
Here we support up to 3.6 and 3.7 now -- we're the first on the block to support Python 3.7! PyPy versions 2.7, 3.2, 3.5, and 3.6 are also supported.
A number of bug have been squashed but others still run rampant. Some the lesser-used 3.6-3.7 and PyPy opcodes haven't been implemented. However about 300 of the tests that Python's uses to test itself pass; the same is true for other versions.
There is the usual bug fixes, and code cleanups. We do a tad better in cross-version bytecode interpretation.
Tests are getting converted to a form that is more amenable test isolation and not spewing diarrhea when there is a failure.
Although this is still very much a work in progress, we've come a very long way from where this started.
A One oh release - you know what that means.
There have been numerous changes since byterun.
Probably of most interest is probably support for newer Pythons - 3.4 and some 3.5. 3.5 is still a little weak. Using routines from xdis we added support for wordcode (when we get around to 3.6+) and EXTENDED_ARGS
which is more prevalent when wordcodes are in use, since an operand size is only one byte without the "extended arg" prefix.
Since we are using xdis
, we have the ability to read and parse bytecode files from a version of Python different from the one running. Making use of this, xpython
can accept a bytecode file in addition to accepting Python source code.
We also added support for Python 2.6, 2.5 and 3.2. Since the x-python
doesn't run before Python 2.7, bytecode for 2.5 and 2.6 must be supplied for those versions.
The code has been reorganized to allow support for more bytecode and to be able to scale testing to a much greater extent. (I will say that the tests that were byterun were generally pretty good for the kinds of things it tests).
The level of verbosity on nosetests -s
has been reduced by removing the disassembly listing by default. If you want a disassembly listing, consider pydisasm
from the xdis
package. This works because I've pulled out many of the Python test programs from strings in the tests to individual files. This makes it much easier to debug individual problems with those tests. And it makes the test files much shorter, at the expense of more files in a test directory. However I consider that good. If the test file is a real Python file then when you edit your editor will better understand what's in the string, and you can compile it and get lint on it. Oh, and it makes it easier to write comments describing more about what's up with the test.
Some of the bugs in MAKE_FUNCTION
have been fixed. (It is expect that these would appear since Python function signatures are complicated the internal have changed numerous times between releases.
Some command options have now change. Of note is -v
is now --debug-level
, -d
which takes an integer parameter which specifies the level of verbosity. -d1
gives a trace of instructions while -d2
includes the block and evaluation stack. In general I'll try to follow the Python command options, and -d
, not -v
is what CPython uses.
(The packaging in 1.0.0 got botched, hence we start with 1.0.1)