[PyKDE] Changes in Current SIP & PyQt Snapshots

Phil Thompson phil at riverbankcomputing.co.uk
Wed Oct 8 16:21:01 BST 2003


With SIP v4 getting closer, there are a some major changes in current SIP and 
PyQt snapshots.

The first thing to say is that if you are using SIP v3.8 to generate your own 
extension modules then the snapshots should continue to work - it's a bug if 
they don't. I've stopped introducing incompatibilities to SIP v3 in order to 
align it to SIP v4. Instead SIP v3 will support the old way of doing things 
as well as the new (SIP v4) way of doing things.

SIP now takes a -w flag which will issue warnings if you are using features 
that will not appear in SIP v4. It doesn't identify all of them (eg. utility 
functions called from handwritten code) but it's better than nothing.

The biggest changes are that %MemberCode and %VirtualCode are deprecated and 
replaced with %MethodCode and %VirtualCatcherCode. The result is that the 
amount of handwritten code needed is greatly reduced and much simpler.

The sip.h file has been updated to properly identify which utility functions 
are part of the SIP v4 API. If, when you have ported your handwritten code to 
the v4 style, you think that there are v3 specific functions you still need 
then let me know.

The other area of change is build.py for both SIP and PyQt. The SIP build.py 
now creates and installs a module called sipconfig.py. This contains 
information about the system configuration and utilities for use by extension 
modules' own build.py. As a result PyQt's build.py is now 600 lines, rather 
than 1600 lines, and takes fewer command line arguments. Eventually this 
mechanism will be extended so that PyQt's build.py will install a 
pyqtconfig.py module for use by extension modules that are built on top of 
PyQt.

The current PyQt snapshot has been fully migrated to the new scheme. It will 
work unchanged with both SIP v3 and v4 and contains no "If v3 ... else ..." 
sort of code.

No date yet on when SIP v4 snapshots will be made available, but I hope it 
will be weeks rather than months.

Phil




More information about the PyQt mailing list