The Pmw 2.0.0 release built against python 3.4.3 on x86_64-apple-darwin14 exhibits the following failure when the EntryField demo widget is selected from the All.py demos window under python 3.4.3.
TypeError Exception in Tk callback
Function: <function ScrolledListBox.__init__.<locals>.releaseEvent at 0x104ee88c8> (type: <class 'function'>)
Args: (<tkinter.Event object at 0x105066dd8>,)
Event type: ButtonRelease (type num: 5)
Traceback (innermost last):
File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwBase.py", line 1760, in __call__
return self.func(*args)
File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwScrolledListBox.py", line 87, in releaseEvent
_handleEvent(event, 'release')
File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwScrolledListBox.py", line 377, in _handleEvent
_listboxCache[event.widget]._handleEvent(event, eventType)
File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwScrolledListBox.py", line 344, in _handleEvent
command()
File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwBase.py", line 1632, in callback
rtn = self._command(*args)
File "All.py", line 193, in startDemo
self.widget = eval(demoName + '.Demo(frame)')
File "<string>", line 1, in <module>
None
File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/demos/EntryField.py", line 38, in __init__
'fmt' : 'ymd'},
File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwEntryField.py", line 92, in __init__
self.initialiseoptions()
File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwBase.py", line 606, in initialiseoptions
func()
File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwEntryField.py", line 168, in _validate
self._checkValidity()
File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwEntryField.py", line 260, in _checkValidity
valid = self._getValidity()
File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwEntryField.py", line 236, in _getValidity
status = dictio['validator'](*(text,), **args)
TypeError: datevalidator() got an unexpected keyword argument 'fmt'
================================================
Event contents:
char: ??
delta: 0
height: ??
keycode: ??
keysym: ??
keysym_num: ??
num: 1
send_event: False
serial: 1217
state: 256
time: 1058654474
type: 5
widget: .4377599056.4377641984.4377642040.4377644616.4377642208
width: ??
x: 62
x_root: 70
y: 141
y_root: 181
A similar crash is seen in the HistoryField widget from the All.py demos window under python 3.4.3...
The same failures are seen with Pmw 2.0.0 run against python 3.3.6 on x86_64-apple-darwin12 using tcl/tk 8.5.18. The original report for python 3.4.3 was run against tcl/tk 8.6.4.
Note that this issue seems to be similar to the one previously reported in https://sourceforge.net/p/pmw/discussion/33675/thread/367b1b73/.
Jack,
Thanks for the report. There are two different issues there:
There also seem to be multiple issues showing up in the tests so repackaging will have to wait until I can clear all of them; I haven't gotten around to them yet so I can't offer an estimate, hopefully it will be this week.
The format option was fixed in https://sourceforge.net/p/pmw/hg/ci/d533281b5eb93351b6cffb79f43cd9eed784dfbb; the HistoryText problem was fixed in https://sourceforge.net/p/pmw/hg/ci/30ff9121b5970790228bfc06a51f21bcd0655cda/
Fixed in 2.0.1-alpha
One last issues with 'format' exists in the Counter demo...
Counter.py: entryfield_validate = {'validator' : 'date', 'format' : 'dmy'},
Counter.py: datatype = {'counter' : 'date', 'format' : 'dmy', 'yyyy' : 1})
Counter.py: entryfield_validate = {'validator' : 'date', 'format' : 'ymd',
Counter.py: datatype = {'counter' : 'date', 'format' : 'ymd', 'yyyy' : 1,
changing these to 'fmt' solves the failure...
I also see 'format' present in Args.py...
Args.py: format = '\n %-' + str(max) + 's %s'
Args.py: rtn = rtn + format % (arg, definition)
but assume this usage isn't problematic.
These issues should have been solved by the package I uploaded yesterday but that is the correct change. There was a situation in which, under Python 3.0, the 'format' keyword broke some functionality, this is why I renamed it in the date utils. All other instances of 'format' should stay the same.