IronPython and PyFit
Problem — PyFit uses the parser
module.
Workround —
- remove redundant
import compiler
from fit\TypeAdapter.py - remove
import compiler
from fit\taBase.py - remove
seq_types, map_types, oper_types
from fit\taBase.py - remove
_safeAssemble
from fit\taBase.py - remove
_safeEval
from fit\taBase.py and lose the ability to input non-scalar types (string being scalar); or replace its body withreturn eval(s)
and lose the protection against wild input (sorta-OK if your FitNesse wiki is on an internal network).
Either approach breaks various of the PyFit unit tests, but does permit you to run IronPython 1.x directly, so long as you keep your cell types under control.
Special case - IronPython 2.0alpha1
This currently has problems with the type() function used in CellHandlers.isValid(). Unroll the in
test as follows
which passes the unit tests.
I believe that the type() problem is known in IronPython 2.0α1, but for the record, a minimal test case, in case it persists into beta
yields
C:\Documents and Settings\Steve\My Documents\code\python>\IronPython-2.0A1\ipy.exe ipy2.py Traceback (most recent call last): File ipy2.py, line 5, in Initialize File , line 0, in _stub_##14 File ipy2.py, line 3, in inspect File , line 0, in ContainsValueWrapper##18 File , line 0, in _stub_##19 SystemError: Object reference not set to an instance of an object.
2 comments :
I don't know that we knew about this but we do now :). It's a trivial fix.
Also, see later post on this subject, using IPCE-r6 : FePy r6 + 1 line of code runs PyFit
Post a Comment