[PEAK] PEAK-Rules for Python3

PJ Eby pje at telecommunity.com
Sat Apr 4 20:30:56 EDT 2015

Okay, I'm done: the version of PEAK-Rules that's in SVN now runs its
tests with fewer than 1000 lines of error output on Python 3.1-3.4,
with no segfaults.  BytecodeAssembler's tests still segfault under
3.3+, though I know what the problem is and how to fix it; I've just
been focused on getting PEAK-Rules to work on 3.x at all.

The segfault I fixed was due to a change in Python 3 in how exception
blocks are processed: there's now a POP_EXCEPT that has to be added to
exception handlers, and there was a change in stack levels.  The
unfixed problem is that in 3.3+, MAKE_FUNCTION and MAKE_CLOSURE now
take an extra value on the stack, containing the function's "qualified

PEAK-Rules' 40 non-doctest tests all pass on 3.1 and 3.2, with one
failure on 3.3 and 3.4.  Of the 8 doctest files, 1 is running clean
(AST-Builder), and the rest have varying amounts of failures -- mostly
shallow, being caused by repr() changes, loss of features relative to
Python 2, or etc.  (A small number of them may represent actual
problems, however.)

If you'd like to try any of this, be aware that you need to have a
current *svn checkout* of ALL the packages used: AddOns,
BytecodeAssembler, DecoratorTools, Extremes, Importing, PEAK-Rules,
and SymbolType.  You'll then need to use `setup.py develop` to install
them locally, in the correct order.  Some of this won't work right if
you're using a setuptools version that's not compatible with your
local svn checkout format... or one of the newfangled setuptools
versions that don't support Subversion at all, or get cranky about the
new PEP-mandated version numbering schemes.  So, consider all this
highly experimental at the moment, for only the most motivated
persons.  ;-)

More information about the PEAK mailing list