Dear Python team,

I'm having some difficulty figuring out how best to address this bug,
and am looking for input on this.

Short story (feel free to read more details in the bug report,
https://bugs.debian.org/1070215):

* python3-qtpy is meant to be a metapackage that provides a uniform
  interface to Qt, either via PyQt5, PyQt6 or PySide 6 (and upstream
  also PySide 2).

* python3-qtpy should not have any explicit dependencies on PyQt5,
  PyQt6 or PySide 6 packages; the decision of which Qt backend to use
  should be left to the maintainer's discretion.

* Currently, python3-qtpy depends on the whole PyQt5 framework, and
  most (all?) packages depending on python3-qtpy rely on this.

* The current setup prevents packages from depending on python3-qtpy
  and, say, PySide 6 without also pulling in the whole of PyQt5.

* The bug proposes that python3-qtpy becomes a minimal package
  providing the qtpy module only, but no longer depending on PyQt5,
  and providing metapackages python3-qtpy-{qt5,qt6,pyside6} that
  depend on python3-qtpy and the relevant PyQt5/PyQt6/PySide6
  packages.  There is an MR (merge request) on salsa that implements
  this proposal.

This all seems very sensible, but the difficulty is how to perform the
transition.  The bug report has several suggestions, but there's a
problem I hadn't considered earlier.  THere are lots of source
packages that Build-Depend on python3-qtpy, and (presumably) their
pyproject.yaml or similar specifies a dependency on qtpy.  Then
pybuild determines the package that provides qtpy and adds this to
python3:Depends.  That means that there is no (easy) way to change the
binary Depends fields to read

   Depends: ..., python3-qtpy-qt5 | python3-qtpy (<< 2.4.1-3), ...

as these dependencies are automatically generated.  Adding an explicit
dependency in debian/control will end up with the dependency becoming
"python3-qtpy, python3-qtpy-qt5 | python3-qtpy (<< 2.4.1-3)", which is
not at all helpful.

So it seems that there is not much hope for anything other than a
"break-the-world day".

My current best idea is:

1. Upload python-qtpy 2.4.1-3 with all of the metapackages in the MR,
   but with python3-qtpy still explicitly depending on the Qt5
   packages.  (The current python-qtpy version is 2.4.1-2.)

2. Once this has transitioned to testing, file Severity: important
   bugs against all of the packages (build-)depending on python3-qtpy,
   asking them to either add an explicit dependency on python3-qtpy-*
   or on the specific Qt*/PySide6 packages that they require.

3. After a period of time, say a month, do NMUs for all the packages
   that have not closed these bugs to add an explicit dependency on
   python3-qtpy-qt5, meaning that the behaviour will be unchanged.

4. Once that is done, upload python-qtpy 2.4.1-4 which drops all of
   the Qt5 dependencies from python3-qtpy.


I'd really appreciate some feedback on this proposal.

Best wishes,

   Julian

Reply via email to