dh-python: Deps guarded by (python3 << 3.X) break python-3.(X-1) use

Bug #2002819 reported by Simon Chopin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dh-python (Debian)
Fix Released
Unknown
dh-python (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Imported from Debian bug http://bugs.debian.org/1028603:

Package: dh-python
Version: 5.20221001
Severity: normal
X-Debbugs-Cc: <email address hidden>

For instance, pylint has "tomli>=1.1.0;python_version<'3.11'" in its
pyproject.toml, which is translated as "python3-tomli (>= 1.1.0) |
python3 (>= 3.11)".

This means that if we have python == 3.11 but still have python3.10 in
the archive, any code that iterates over all supported archive risks
failing simply due to the tomli module missing.

This is currently happening in the distro-info autopkgtests for the
python3-defaults migration from unstable to testing (and also in
Ubuntu). I'll probably be adding tomli as a test dependency in Ubuntu as
a stopgap, but I figured someone might think of a better long-term
solution to the issue.

-- System Information:
Debian Release: bookworm/sid
  APT prefers kinetic-updates
  APT policy: (500, 'kinetic-updates'), (500, 'kinetic-security'), (500, 'kinetic'), (400, 'kinetic-proposed'), (100, 'kinetic-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.19.0-29-generic (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dh-python depends on:
ii python3 3.10.6-1
ii python3-distutils 3.10.7-1

dh-python recommends no packages.

Versions of packages dh-python suggests:
ii dpkg-dev 1.21.9ubuntu1
pn flit <none>
ii libdpkg-perl 1.21.9ubuntu1
pn python3-build <none>
pn python3-installer <none>
ii python3-tomli 2.0.1-1

-- no debconf information

Changed in dh-python (Debian):
importance: Undecided → Unknown
Changed in dh-python (Debian):
status: New → Fix Released
Revision history for this message
Stefano Rivera (stefanor) wrote :

Sorry, didn't close this in the changelog, but this was fixed in 6.20230813

Changed in dh-python (Ubuntu):
status: New → Fix Released
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.