Message6403

Author pjenvey
Recipients anamitrab, otmarhumbel, pjenvey
Date 2011-02-23.05:02:16
SpamBayes Score 2.821871e-06
Marked as misclassified No
Message-id <1298437336.99.0.886527569916.issue1709@psf.upfronthosting.co.za>
In-reply-to
Content
Like I said on the ML ( http://old.nabble.com/Re%3A-jython-2.5.2-jsr-223-bug-p30988917.html ), the fact that the jsr223 ScriptEngineScope has always done this __tojava__/Py.java2py dance must cause this

datetime.date.__tojava__ returns a java.sql.Date. That doesn't necessarily mean Py.java2py(java.sql.Date) will give you a datetime.date back

Plus I think this "feature" could cause a significant slowdown of python code executing with the scope of the jsr223 context. Historically it's behavior adopted from the old jsr223 implementation. It needs to be rethought

Anamitra, thanks for the logging this, in your case you may be able to hack around the problem by disabling datetime.date's tojava conversion by calling this after importing datetime:

del datetime.date.__tojava__

this issue likely also affects datetime.time/datetime, Decimal and threading.Thread objects
History
Date User Action Args
2011-02-23 05:02:16pjenveysetmessageid: <1298437336.99.0.886527569916.issue1709@psf.upfronthosting.co.za>
2011-02-23 05:02:16pjenveysetrecipients: + pjenvey, otmarhumbel, anamitrab
2011-02-23 05:02:16pjenveylinkissue1709 messages
2011-02-23 05:02:16pjenveycreate