#1089961 python3-ferret: python3-qtpy dropping dependency on PyQt5; Dependencies need updating

Package:
python3-ferret
Source:
python3-ferret
Description:
Python3 wrapper for the Ferret visualization and analysis environment,
Submitter:
Date:
2025-01-07 01:45:03 UTC
Severity:
normal
Tags:
#1089961#5
Date:
2024-12-14 21:08:20 UTC
From:
To:
Dear Maintainer,

Your binary package python3-ferret currently Depends on python3-qtpy.

The upstream qtpy package is intended to be a metapackage, able to
work with any of PyQt5, PyQt6, PySide2 or PySide6 as the Qt backend.
Until now, the Debian python3-qtpy package has Depended on PyQt5, but
that is about to change.  From version 2.4.2-3 of python3-qtpy
(currently in experimental), it no longer Depends on any Qt backend,
so these will need to be explicitly listed in the package's Depends
field.  To help, there are also new metapackages python3-qtpy-pyqt5,
python3-qtpy-pyqt6 and python3-qtpy-pyside6 already in testing that
depend on python3-qtpy and the respective Qt backend.

Action required: update the Depends field to depend on the required Qt
backend packages.

Approach 1 (the "best" approach):

Identify the Python backend packages required and add these to
Depends.  (These dependencies could be PyQt5 dependencies, but they
could equally be PyQt6 or PySide6 dependencies.)

Approach 2 (should work in all cases, but will pull in more than needed):

Add python3-qtpy-pyqt5 as an explicit dependency to the Depends field,
or replace the python3-qtpy dependency with python3-qtpy-pyqt5 (as the
latter Depends on python3-qtpy).  This will exactly replicate the
current behaviour.


Before uploading a new version of your package to close this bug,
please do both build and test it using python3-qtpy 2.4.2-3 from
experimental.


I intend to upload python-qtpy 2.4.2-4 to unstable with this change in
mid-to-late January.  I will do an NMU or team upload if required for
this bug from mid-January.

For a background on the reason for this change, please see
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1070215

Best wishes,

   Julian

#1089961#12
Date:
2024-12-26 17:44:41 UTC
From:
To:
After having fixed one of my packages to address this (should have
done this first, sorry!), I have tried to streamline this process.  I
have written a comprehensive

/usr/share/doc/python3-qtpy/README.Debian.gz

explaining how qtpy works and how to determine the dependencies
required.  I have also written a script to calculate the
Debian PyQt5/PyQt6/PySide6 dependencies from a list of imported qtpy
modules, called qtpy-get-dependencies(1).

These can be found in python3-qtpy 2.4.2-4 (unstable, waiting to
migrate to testing) and 2.4.2-5 (experimental, which has again dropped
the PyQt5 dependencies from python3-qtpy).

Best wishes,

   Julian

#1089961#17
Date:
2025-01-07 01:43:24 UTC
From:
To:
pyferret doesn't actually use qtpy at all so this dependency can be dropped.

Instead, pyferret uses its own custom layer that first looks for
PySide2, then PyQt5, then PyQt4.

$ findimports 2>/dev/null | grep PySide2 | cut -f1-2 -d. | sort -u
   PySide2
   PySide2.QtCore
   PySide2.QtGui
   PySide2.QtPrintSupport
   PySide2.QtSvg
   PySide2.QtWidgets

That translates to:
  python3-pyside2.qtcore,
  python3-pyside2.qtgui,
  python3-pyside2.qtprintsupport,
  python3-pyside2.qtsvg,
  python3-pyside2.qtwidgets,

Picking instead the PyQt5 packages, that would be:
  python3-pyqt5,
  python3-pyqt5.qtsvg,

In the interests of making minimal changes I've gone for the latter in
git - the old python3-qtpy dependency accidentally brought in those
packages. However, it might be worth changing to PySide2 instead to
match the upstream intention.

I've not uploaded the package as there are other issues with the
packaging - the python modules don't seem to be missing files and CI
currently fails, and it has been removed from testing.