Roger Binns
2004-04-20 03:11:55 UTC
I just spent some quality time seeing how much effort is involved
in moving to wxPython 2.5. Because we already use the new wx
namespace, there was very little issue there. There were also
some items manually imported from random bits of the wxPython
namespace as they weren't correctly exposed in the 2.4 wx
namespace. Those are all trivial to deal with (took me about
3 minutes :-)
However there are a large number of wx object methods where
parameters have changed, typically from individual parameters
into tuples. There is no way to write the code so that it
works on both wx 2.4 and 2.5 in one line. It would have to
look like this instead:
if wx.VERSION>=(2,5):
sizer.Add( (10,10), 0, wx.EXPAND)
else:
sizer.Add( 10, 10, 0, wx.EXPAND)
Needless to say, it is a royal pain going through all the
code where these changes need to be made since it is a lot
of different methods. I soon got bored.
My earlier instinct was to only support one version of wxPython
and that still remains the case. There have been enough
bug reports about 2.5 that we will wait till the next release
and then do the switch.
Roger
in moving to wxPython 2.5. Because we already use the new wx
namespace, there was very little issue there. There were also
some items manually imported from random bits of the wxPython
namespace as they weren't correctly exposed in the 2.4 wx
namespace. Those are all trivial to deal with (took me about
3 minutes :-)
However there are a large number of wx object methods where
parameters have changed, typically from individual parameters
into tuples. There is no way to write the code so that it
works on both wx 2.4 and 2.5 in one line. It would have to
look like this instead:
if wx.VERSION>=(2,5):
sizer.Add( (10,10), 0, wx.EXPAND)
else:
sizer.Add( 10, 10, 0, wx.EXPAND)
Needless to say, it is a royal pain going through all the
code where these changes need to be made since it is a lot
of different methods. I soon got bored.
My earlier instinct was to only support one version of wxPython
and that still remains the case. There have been enough
bug reports about 2.5 that we will wait till the next release
and then do the switch.
Roger