[PyQt] PyQt4 Support for Multiple APIs

Phil Thompson phil at riverbankcomputing.com
Sat Jan 30 18:15:46 GMT 2016


As you probably know, PyQt4 supports multiple, incompatible APIs...

http://pyqt.sourceforge.net/Docs/PyQt4/incompatible_apis.html

The old APIs were the default for Python v2 and the new ones the default for Python v3.

The feature was added to aid in the porting of applications from Python v2 to Python v3. It was never intended that production code should make use of it - although I doubt I ever made that as explicit as I should have. For example, all the packages used by an application must agree to use the same APIs, which makes using third-party code problematic.

With hindsight it's something I wish I'd never implemented. The code to support it is complex and is unlikely to be used again in the future - so it will probably not get tested properly. Consequently I'm considering dropping the support in SIP v4.18 and PyQt v4.12.

Please let me know if you are switching to the later APIs in your Python v2 code. Hopefully nobody is, but maybe everybody is...

Phil


More information about the PyQt mailing list