[PEAK] PEAK-Rules for Python3

PJ Eby pje at telecommunity.com
Thu Apr 9 13:55:23 EDT 2015

Update: I've reviewed all remaining PEAK-Rules failures on 3.1, 3.2
and 3.4, and what's left at this point is just a missing feature:
method argument binding is broken, due to dependence on named tuple
args.  Everything else is shallow or cascading errors, now that I've
updated BytecodeAssembler to emulate the SLICE_X opcodes from Python
2.x.  (Note that 3.3+ changes dictionary and function reprs and
certain dissasembly bits, which adds a couple hundred lines more
failure output compared to 3.1/3.2, but AFAICT these are all shallow.)

Also, I've changed syntax binding variables to the form ~~x instead of
`x` -- the latter syntax still works on 2.x, but of course is not
available on 3.x.

If you find anything in PEAK-Rules that's not working on 3.x that
*doesn't* depend on tuple argument syntax, let me know.

On Thu, Apr 9, 2015 at 12:15 PM, PJ Eby <pje at telecommunity.com> wrote:
> Yes.  Slicing is broken, as is syntax pattern matching.  I'm not
> seeing any breakage on peak.rules.debug's import, though.  As of this
> morning, Python 3.1 has 735 lines of failure output from `setup.py
> test`, in about 30-something individual doctest failures, almost half
> of which are pure repr issues, where the values shown as not matching
> are actually equal.  Most of the remaining ones are either
> SyntaxErrors caused by unsupported-on-3.x syntax, slicing problems, or
> cascading errors from the two preceding things.  I only see two errors
> that look like they need further investigation: the MRO problem in
> README.txt, and the 'NoneType is not callable' in Predicates.txt.
> I'm thinking that I need to change the pattern-matching syntax to
> something like `[[var]]` instead of backquotes, though for backwards
> compatibility I'll still support backquotes.  But then the tests and
> things can use [[]] syntax to work across 2.x and 3.x.
> (Btw, I just checked in some more test cleanup stuff, to clear away
> several more false positive test failures on 3.x)
> On Thu, Apr 9, 2015 at 9:50 AM, Cara <ceridwen.mailing.lists at gmail.com> wrote:
>> I haven't had much chance to look at this this week, but I checked out
>> and installed the current versions in SVN.  Except for the same
>> segfaults in BytecodeAssembler's tests, most of the major bugs I saw are
>> gone.  There are some real bugs still in PEAK-Rules, some of which are
>> shallow but may be concealing more serious bugs (the peak.rules.debug
>> import in test_rules.py is broken), some of which are shallow and easily
>> fixable (__repr__ differences), and some of which look like real bugs.
>> I could post the log if it would be helpful, but I assume you're seeing
>> the same thing.
>> Cara

More information about the PEAK mailing list