Bug 620023
Summary: | python-peak-util-assembler appears to use JUMP_IF_FALSE - needs porting to python 2.7 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Dave Malcolm <dmalcolm> | ||||||
Component: | python-peak-util-assembler | Assignee: | Luke Macken <lmacken> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | 14 | CC: | a.badger, lmacken, pfrields | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | python-peak-util-assembler-0.6-2.20100803svn2646.fc14 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2010-08-05 14:27:30 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 619913, 620019 | ||||||||
Attachments: |
|
Description
Dave Malcolm
2010-07-31 12:58:04 UTC
(In reply to comment #0) > It appears that we do run the selftests in python-peak-util-assembler.spec: > %check > nosetests > > so it's a bit disturbing that this rebuilt successfully against 2.7: > http://kojipkgs.fedoraproject.org/packages/python-peak-util-assembler/0.5.1/2.fc14/data/logs/noarch/build.log > > + nosetests > . > ---------------------------------------------------------------------- > Ran 1 test in 0.036s > OK BytecodeAssembler-0.5.1/test_assembler.py has: def additional_tests(): import doctest return doctest.DocFileSuite( 'README.txt', optionflags=doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE, ) and README.txt has doctests for Try/Except, which do include JUMP_IF_FALSE. Are the doctests really getting run in our builds? Running nosetests "passes", but it looks like the tests aren't run: . ---------------------------------------------------------------------- Ran 1 test in 0.034s OK Running: python setup.py test fails with numerous errors from inside README.txt; will attach Created attachment 435753 [details]
Log of selftest failures against python 2.7
Created attachment 435757 [details] Initial attempt at a patch; doesn't work yet. Unfortunately the doctests contain lots of embedded assumptions about Python bytecode. I'm attaching an attempt at a patch for the higher-level API, which is what I believe peak-rules is using. This doesn't work yet, I get exceptions in the stack-depth checking. Looks like this needs to be reworked to cope with the stack-effect of a bytecode varying based on whether or not a conditional branch is followed, which is the case for JUMP_IF_TRUE_OR_POP and JUMP_IF_FALSE_OR_POP (see http://svn.python.org/view/python/trunk/Doc/library/dis.rst?r1=70071&r2=70070&pathrev=70071 ) I email pje/peak mailing list about this and he's made a few workarounds and a new release: http://pypi.python.org/pypi/BytecodeAssembler/0.5.2 There's a few test failures but they're only supposed to be false positives. Explanation here: http://www.eby-sarna.com/pipermail/peak/2010-August/003375.html Note that 0.5.2 has a license change: diff of PKG-INFO: -License: PSF or ZPL +License: http://www.apache.org/licenses/LICENSE-2.0 python-peak-util-assembler-0.6-2.20100803svn2646.fc14 has been submitted as an update for Fedora 14. http://admin.fedoraproject.org/updates/python-peak-util-assembler-0.6-2.20100803svn2646.fc14 python-peak-util-assembler-0.6-2.20100803svn2646.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report. |