qbrz appears to depend on sip version 4

Bug #2000793 reported by Olaf Seibert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qbrz
Fix Committed
High
Robert Ladyman

Bug Description

I'm packaging qbrz for pkgsrc, and when refreshing all my packages, I noticed that "brz qlog" only worked if I also installed the package "py39-sip-4.19.25". Otherwise there would be an error

$ brz qlog
Unable to load plugin 'qbrz' from '/usr/pkg/lib/python3.9/site-packages/breezy/plugins/qbrz': No module named 'sip'
brz: ERROR: unknown command "qlog". Perhaps you meant "log"

This is likely because .../site-packages/breezy/plugins/qbrz/__init__.py contains

# TODO: this might not be necessary now
# RJL to speed development, retain Qt4 for now: use ``sip.setapi`` to request
# version 1 behaviour for ``QVariant`` (otherwise it's not available for python3)
import sip
sip.setapi('QVariant', 2)

However, sip versions newer than 4 don't have a 'sip' module; instead they have a 'sipbuild' module. If I understand those different versions correctly.

On the other hand, py-Qt5 uses sip version 6 (but maybe doesn't need it at runtime? I'm not sure).

Requiring 2 sip versions isn't very nice; version 4 is quite old and seems to be deprecated; also I suspect it's not needed anyway since the comment above refers to Qt4, which is no longer used.

Related branches

Revision history for this message
Olaf Seibert (rhialto) wrote :

If I look at the packaging of PyQt5_sip-12.11.0.tar.gz (used py py-Qt5), there is a

${PYSITELIB}/PyQt5/sip.so

so maybe that's the one that's wanted by qbrz; but it would need to be imported as PyQt5.sip instead, I expect.

Changed in qbrz:
assignee: nobody → Robert Ladyman (saccadic-masking)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Robert Ladyman (saccadic-masking) wrote :

I checked the PyQt5 documentation and the import sip will fail if no PyQt5 imports are performed before it.

https://www.riverbankcomputing.com/static/Docs/PyQt5/incompatibilities.html#pyqt-v5-11

Have adjusted imports accordingly. Just running tests to see if removing the setapi() call is OK (I note that setapi() has been deprecated).

Changed in qbrz:
status: In Progress → Fix Committed
Revision history for this message
Luke Howison (lukehnz) wrote :

I'm getting this error when installing qbzr:

ERROR: Could not find a version that satisfies the requirement python3-sip (from qbrz) (from versions: none)
ERROR: No matching distribution found for python3-sip

I have installed python3-sip (4.19.25+dfsg-3build1). This is on Ubuntu 22.04.3 LTS

Revision history for this message
Robert Ladyman (saccadic-masking) wrote :

Luke, many thanks for the report. Did you install qbzr from Ubuntu itself or download and attempt to install qbrz from code?

Revision history for this message
Luke Howison (lukehnz) wrote :

Hi Robert, I was following the instructions on Launchpad (bzr branch lp:qbrz / make tarball), I didn't realise I could just do 'sudo apt install qbrz'. That worked great, thanks.

I did encounter several bugs which cause qbrz to crash, but I'll report those separately.

Revision history for this message
Robert Ladyman (saccadic-masking) wrote :

Thanks Luke - all bugs appreciated.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.