python3-yaml and python3-six are not co-installable with python-is-python2 in jammy

Bug #1958720 reported by Rolf Leggewie
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyyaml (Ubuntu)
Fix Released
High
Robie Basak
six (Ubuntu)
Fix Released
Undecided
Robie Basak

Bug Description

The packages python3-yaml and python-is-python2 are not co-installable in jammy and I believe they should be. This currently prevents me from upgrading one of my machines from focal to jammy.

Further analysis with the help of Stefano Rivera revealed that what-is-python no longer produces a python-is-python2 package and the changelog hints at that being intentional. Jammy still has a python2 package, though.

python3-yaml in jammy breaks on python (<2.7.18). The python-is-python2 package in focal is version 2.7.17-4 and in impish it is 2.7.18-9 and thus will be forcefully removed when going to jammy.

Rolf Leggewie (r0lf)
description: updated
Rolf Leggewie (r0lf)
description: updated
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Stefano committed a change in upstream Debian git for the experimental branch: https://salsa.debian.org/python-team/packages/pyyaml/-/commit/1d1897f525e4cc150e7dfe50b9ada13ba3d50a9a

description: updated
no longer affects: what-is-python (Ubuntu)
Rolf Leggewie (r0lf)
Changed in pyyaml (Ubuntu):
status: New → In Progress
assignee: nobody → Rolf Leggewie (r0lf)
Revision history for this message
Rolf Leggewie (r0lf) wrote :
Rolf Leggewie (r0lf)
summary: - python3-yaml and python-is-python2 are not co-installable in jammy
+ python3-yaml and python3-sixx are not co-installable with python-is-
+ python2 in jammy
summary: - python3-yaml and python3-sixx are not co-installable with python-is-
+ python3-yaml and python3-six are not co-installable with python-is-
python2 in jammy
tags: added: rls-jj-incoming
Rolf Leggewie (r0lf)
Changed in pyyaml (Ubuntu):
assignee: Rolf Leggewie (r0lf) → nobody
Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

Thank you, Rolf. On a quick look, what you reported appears to be correct and hopefully the debdiff you added should just resolve the issue at hand. I'm adding the `server-todo` tag so that someone from the Server team can take a look at this and sponsor the debdiff for you if that's all what's need to be done.

Thank you very much!

tags: added: server-todo
Changed in pyyaml (Ubuntu):
status: In Progress → Confirmed
importance: Undecided → High
Changed in six (Ubuntu):
status: New → Invalid
Revision history for this message
Matthias Klose (doko) wrote :

there is no python-is-python2 in jammy anymore

Revision history for this message
Rolf Leggewie (r0lf) wrote (last edit ):

OK, so it's an obsolete package as was pointed out in the original ticket description #0. I don't see a reason here to intentionally break users. As far as I can see the obsolete package continues to work just fine as an obsolete package in jammy.

Rolf Leggewie (r0lf)
Changed in six (Ubuntu):
status: Invalid → Confirmed
status: Confirmed → New
Revision history for this message
Rolf Leggewie (r0lf) wrote :
Changed in six (Ubuntu):
status: New → Confirmed
Bryce Harrington (bryce)
tags: added: server-triage-discuss
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Robie will take a look, but likely not immediately, more like next week.

tags: removed: server-triage-discuss
Changed in six (Ubuntu):
assignee: nobody → Robie Basak (racb)
Changed in pyyaml (Ubuntu):
assignee: nobody → Robie Basak (racb)
Revision history for this message
Robie Basak (racb) wrote (last edit ):

I've investigated and I don't understand the issue. Has something changed in the archive?

On a Jammy system I was able to install python2, python2.7, python3-yaml and python3-six, as well as manually install the python-is-python2 package from Impish. I didn't hit any co-installability problems. The versions I now have installed are:

python-is-python2 2.7.18-9
python2 2.7.18-3
python2.7 2.7.18-13
python3-six 1.16.0-3
python3-yaml 5.4.1-1

> python3-yaml in jammy breaks on python (<2.7.18). The python-is-python2 package in focal is version 2.7.17-4 and in impish it is 2.7.18-9 and thus will be forcefully removed when going to jammy.

I don't see how that Breaks is relevant. "python" != "python-is-python2", so python3-yaml having a breaks on *python* (<< 2.7.18) doesn't have any direct impact on the python-is-python2 package. And Jammy ships python2 2.7.18-3 anyway.

> OK, so it's an obsolete package as was pointed out in the original ticket description #0. I don't see a reason here to intentionally break users.

Packages not actually shipped in Jammy aren't supported and it's in general acceptable for packages that _do_ ship to break them. But I agree with you that there's no need to do so gratuitously. So I tried to reproduce your use case to better understand what we might be able to do to accommodate before drawing any conclusions, but I couldn't.

It may be correct to drop the Breaks as Stefano did in your link, but I'd like to properly understand the implications of that, and what benefit it might bring, before uploading a delta to Ubuntu.

Please could you provide exact steps to reproduce your scenario in Jammy, and then change the bug status back to New or Confirmed? Or is it the case that something has changed in the archive since you reported this, and no further changes are necessary for your use case to work?

Changed in pyyaml (Ubuntu):
status: Confirmed → Incomplete
Changed in six (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Robie Basak (racb) wrote :

> I don't see how that Breaks is relevant. "python" != "python-is-python2", so python3-yaml having a breaks on *python* (<< 2.7.18) doesn't have any direct impact on the python-is-python2 package. And Jammy ships python2 2.7.18-3 anyway.

Sorry, I now see that python-is-python2 Provides "python". But even so, the version of python-is-python2 provided by Impish is high enough to avoid that Breaks, no?

Revision history for this message
Robie Basak (racb) wrote :

Oh, now maybe I see what you mean. If upgrading from Focal to Jammy without going through Impish, you'll have a "too-old" version of python-is-python2? Let me think about this.

Mathew Hodson (mhodson)
no longer affects: six (Ubuntu)
Revision history for this message
Rolf Leggewie (r0lf) wrote (last edit ):

@mhodson: why did you remove six from this ticket? The affect I described is very much present for python3-six. readding six task

@racb: thank you for having a thorough look. you are spot on in #10, the problem is present only focal2jammy, not impish2jammy.

Thus, one possibility to deal with this situation is to instead of completely dropping the breaks is to relax them to exclude the python version from focal. Let me know if this is preferrable and I'll happily provide a debdiff.

Revision history for this message
Robie Basak (racb) wrote (last edit ):

I did some research to ensure that removing the Breaks is safe. Some of this repeats what we covered already but I'm stating it again so my logic is self-contained here.

If python-is-python2 is installed on Focal and I upgrade to Jammy, then python-is-python2 gets removed because of the Breaks.

If python-is-python2 is installed on Impish and I upgrade to Jammy using do-release-upgrade, then python-is-python2 remains but the installer offers to remove it as obsolete. I can refuse, however.

Therefore, by adjusting things so that in the upgrade from Focal to Jammy python-is-python2 can stay installed, I'm not changing behaviour from what the Impish to Jammy upgrade allows anyway. Note that the user will still need to state that they don't want to remove obsolete packages. This is the default if you just press Return.

On Jammy, python3-yaml (src:pyyaml) Breaks python (<< 2.7.18)
On Jammy, python3-six (src:six) Breaks python (<< 2.7.18)

On Focal, python-is-python2 Provides python (= 2.7.17-1)
On Impish, python-is-python2 Provides python (= 2.7.18-2)
Nothing else on Focal nor Impish Provides python.
python is not a concrete package on Focal nor Impish.
On both Focal and Impish, python-is-python2 Depends on python2 but has no Depends or Recommends on any other package.

Therefore the only impact of this change will be against the python-is-python2 package and I don't expect there to be unexpected interactions with any other package by removing the Breaks.

Revision history for this message
Robie Basak (racb) wrote :

Uploaded fixes for pyyaml and six. Now awaiting release team approval. I'll set Fix Committed; this can always be undone if they refuse.

Changed in six (Ubuntu):
assignee: nobody → Robie Basak (racb)
Changed in pyyaml (Ubuntu):
status: Incomplete → Fix Committed
Changed in six (Ubuntu):
status: New → Fix Committed
Revision history for this message
Robie Basak (racb) wrote :

FTR, tumbleweed reviewed the change in principle for me in #ubuntu-devel. Thank you!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pyyaml - 5.4.1-1ubuntu1

---------------
pyyaml (5.4.1-1ubuntu1) jammy; urgency=medium

  * Drop Breaks on python to allow python-is-python2 to remain when
    upgrading from Focal (LP: #1958720)

 -- Robie Basak <email address hidden> Wed, 13 Apr 2022 21:09:36 +0100

Changed in pyyaml (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package six - 1.16.0-3ubuntu1

---------------
six (1.16.0-3ubuntu1) jammy; urgency=medium

  * Drop Breaks on python to allow python-is-python2 to remain when
    upgrading from Focal (LP: #1958720)

 -- Robie Basak <email address hidden> Wed, 13 Apr 2022 21:08:40 +0100

Changed in six (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Robie Basak (racb) wrote :

I verified that this is fixed when upgrading from Focal to Jammy.

Method:

lxc launch ubuntu:focal test
lxc exec test bash
apt -y update && apt -y full-upgrade
apt -y install python-is-python2
do-release-upgrade -d

do-release-upgrade does suggest removing python-is-python2 as obsolete after the upgrade. However if you say no (the default) then the package remains.

Thanks Rolf for the report and the fix.

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.