[PyQt] PyQt releases with private SIP?

Terekhov, Mikhail termim at gmail.com
Sun Feb 19 20:03:34 GMT 2017

On 2/18/17 20:30, Phil Thompson wrote:

> On 18 Feb 2017, at 8:31 pm, Terekhov, Mikhail <termim at gmail.com> wrote:
>> On 2/18/17 13:34, Phil Thompson wrote:
>>> On 18 Feb 2017, at 6:23 pm, Mikhail Terekhov <termim at gmail.com> wrote:
>>>> Hi,
>>>> Right now every time new release of SIP and PyQt5 comes out we need to
>>>> recompile PyQt4 as well even if it was not changed. Would it be possible
>>>> to have PyQt5 release with private SIP? That would make it much easier
>>>> to have multiple PyQt versions installed simultaneously. Yes, it is
>>>> possible to have separate VE for different versions but too many VEs
>>>> quickly becomes VE hell.
>>> You only need to recompile PyQt4 if the major version of the ABI changes. That should happen very infrequently.
>> In theory that is true, but it happened several times in the past when I updated packages on OBS with new minor releases of PyQt4 and SIP but didn't update QScintilla  and then loading Qsci resulted in segmentation fault until QScintilla package was not recompiled.
> Yes, when the major ABI changes you have to re-compile everything (which should be very infrequently).
Infrequently vs. never does matter.
>> Another case would be Windows - rebuilding here is a major undertaking and having independent versions here would be very convenient.
>> BTW leaving old version forever working without maintenance and recompilation is a Good Thing (tm) :)
> Yes, balanced against the overhead of supporting deprecated code.
That is the whole point - there is no need for support, just do not break!
> The introduction of wheels has made binary (as opposed to source) compatibility much more important. It triggered the switch to the limited Python API. I acknowledge the issue you raise - but I don't think it is worth worrying about anymore.
I do not see how Python API matters here. It is the SIP changes that 
break old releases.
This breakage will continue forever while PyQt<*> depends on global SIP 
- PyQT5.9 & new SIP will break
PyQT5.8 and PyQt4 etc. There are projects where old releases are 
supported at the same time as the new
ones and this PyQt feature makes it very inconvenient.

The wheels make it even more frustrating - imagine that installing a 
wheel for PyQt5.9 will break already
recompiled and installed PyQt4 and PyQt5.8!

The solution is simple - just put sip.so inside PyQt<*> package and it 
won't break forever, you can even
install different PyQt versions at the same time - wxWidgets do it for a 
long time. For those who uses SIP
directly there will always be a choice to use standalone SIP or the one 
bundled with PyQt.

May be an option to link in SIP statically would allow those who want it 
to compile independent PyQt?


More information about the PyQt mailing list