Re: PEAK-Rules for Python3

PJ Eby <pje-Wh6+Hckhi6HFNGf7iClzIwC/[email protected]> Mon, 13 Apr 2015 15:28:27 -0400
Newsgroups gmane.comp.python.peak
Message-ID <CALeMXf511CWrMr-NrtUE79owG2ZcW5q-n5B=wMaeLiPv3_yB-g@mail.gmail.com>
Oops, the Python 2 errors are because I forgot to check in some code.
;-)  (Specifically a similar export in BytecodeAssembler.)  The
'anonymous' function thing is because I have a local change to
DecoratorTools that needs a test before I can check it in.  Fixing the
segfault is waiting on me retooling my developer environment a bit so
I can more easily test against all Python versions; I hope to work on
that sometime this week.

In the meantime, if any of the actual functionality of PEAK-Rules
appears broken, let me know.  (Btw, you can get *much* shorter output
from the tests if you use 'setup.py -q test'; it will show only a line
of dots and any actual failures, rather than a detailed accounting of
what is being run.)


On Mon, Apr 13, 2015 at 12:38 PM, Cara <[email protected]> wrote:
> Most of the tests on my system now seem to be passing.  In Python 3,
> PEAK-Rules is clean except for a couple of deprecation warnings.  There
> are some shallow failures in AddOns and BytecodeAssembler's doctests
> still segfault.
>
> http://pastebin.com/2K3Qzb0b
>
> On Python 2 everything is clean except that there are a handful of
> failures for PEAK-Rules.  I think they're all shallow except for a
> failure to import ord from assembler.py.
>
> http://pastebin.com/ScizUKkV
>
> A quick look suggests that because `new` exists in Python 2, ord never
> gets set in assembler.py.
>
> try:
>     from new import code as NEW_CODE, function
> except ImportError:
>     from types import FunctionType as function
>     NEW_CODE = lambda ac, *args: CodeType(ac, 0, *args)
>     long = ord = int
>
> Probably you want to enclose the import in the doctest in another try:
> except: block.  I don't know why you aren't seeing this bug.
>
> Cara
>
>
> _______________________________________________
> PEAK mailing list
> [email protected]
> http://www.eby-sarna.com/mailman/listinfo/peak