Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1018864 > unrolled thread

Bug#966031: git-cola: Uses old name of sip module

Started byDmitry Shachnev <mitya57@debian.org>
First post2020-07-22 13:40 +0200
Last post2020-07-25 11:10 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.debian.bugs.dist


Contents

  Bug#966031: git-cola: Uses old name of sip module Dmitry Shachnev <mitya57@debian.org> - 2020-07-22 13:40 +0200
    Bug#966031: git-cola: Uses old name of sip module David Aguilar <davvid@gmail.com> - 2020-07-25 10:30 +0200
      Bug#966031: git-cola: Uses old name of sip module Dmitry Shachnev <mitya57@debian.org> - 2020-07-25 11:10 +0200

#1018864 — Bug#966031: git-cola: Uses old name of sip module

FromDmitry Shachnev <mitya57@debian.org>
Date2020-07-22 13:40 +0200
SubjectBug#966031: git-cola: Uses old name of sip module
Message-ID<Avlgn-4px-29@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Source: git-cola
Version: 3.7-1
Usertags: sip5

Dear Maintainer,

You are receiving this bug because your package seems to be using PyQt5
and has Python files with "import sip" lines.

With the latest version of PyQt5 in experimental, the private sip module
used by PyQt5 is called "PyQt5.sip", not just "sip". I am going to upload
this version to unstable around end of August.

You may need to update your imports to do something like this:

try:
    from PyQt5 import sip
except ModuleNotFoundError:
    import sip

Alternatively, you may import sip after importing PyQt5. So the following
will work too:

from PyQt5 import QtCore
import sip

Please see the following link for details:

https://www.riverbankcomputing.com/static/Docs/PyQt5/incompatibilities.html#importing-the-sip-module

If you use sip for reasons unrelated to PyQt5, you may leave the old import
as is, but please bear in mind that sip4 is deprecated.

Also, calls like "sip.setapi('QDate', 2)" are not needed at all with PyQt5.
They were needed only with PyQt4 and Python 2. It is safe to delete them.

For the actual documentation of sip module, see the following link:

https://www.riverbankcomputing.com/static/Docs/PyQt5/api/sip/sip-module.html

--
Dmitry Shachnev

[toc] | [next] | [standalone]


#1019217

FromDavid Aguilar <davvid@gmail.com>
Date2020-07-25 10:30 +0200
Message-ID<AwnJ8-1MV-7@gated-at.bofh.it>
In reply to#1018864

[Multipart message — attachments visible in raw view] — view raw

On Wed, Jul 22, 2020 at 4:30 AM Dmitry Shachnev <mitya57@debian.org> wrote:

> Source: git-cola
> Version: 3.7-1
> Usertags: sip5
>
> Dear Maintainer,
>
> You are receiving this bug because your package seems to be using PyQt5
> and has Python files with "import sip" lines.
>
> With the latest version of PyQt5 in experimental, the private sip module
> used by PyQt5 is called "PyQt5.sip", not just "sip". I am going to upload
> this version to unstable around end of August.
>
> You may need to update your imports to do something like this:
>
> try:
>     from PyQt5 import sip
> except ModuleNotFoundError:
>     import sip
>
> Alternatively, you may import sip after importing PyQt5. So the following
> will work too:
>
> from PyQt5 import QtCore
> import sip
>


Hi Dmitriy

git-cola uses the qtpy module:

https://github.com/spyder-ide/qtpy

This module abstracts over various Python+Qt backends -- PyQt4, PyQt5,
PySide, and PySide2 are all supported.

PyQt5 is our recommended backend.

The sip issue is already handled by this module -- the "import sip" code
path is only ever activated in the PyQt4 code paths.  Modern systems will
never hit that code.

The PyQt5 code paths are all sip-free.


Thank you for your work on debian.

cheers,
 --
David

[toc] | [prev] | [next] | [standalone]


#1019219

FromDmitry Shachnev <mitya57@debian.org>
Date2020-07-25 11:10 +0200
Message-ID<AwolP-2fx-1@gated-at.bofh.it>
In reply to#1019217

[Multipart message — attachments visible in raw view] — view raw

Hi David!

On Sat, Jul 25, 2020 at 01:16:27AM -0700, David Aguilar wrote:
> Hi Dmitriy
>
> git-cola uses the qtpy module:
>
> https://github.com/spyder-ide/qtpy
>
> This module abstracts over various Python+Qt backends -- PyQt4, PyQt5,
> PySide, and PySide2 are all supported.
>
> PyQt5 is our recommended backend.
>
> The sip issue is already handled by this module -- the "import sip" code
> path is only ever activated in the PyQt4 code paths.  Modern systems will
> never hit that code.
>
> The PyQt5 code paths are all sip-free.

Thanks for the clarification. I filed these bugs semi-automatically and
did not check each package carefully enough. Indeed there is no issue here,
as the sip import is used only for PyQt4.

Can you please remove the python3-sip dependency then? PyQt5 in unstable
depends on python3-sip itself, and for the new PyQt5 this dependency will
be not needed.

--
Dmitry Shachnev

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.dist


csiph-web