dput relies on python2

Bug #1914967 reported by Rolf Leggewie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dput-ng (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

dput fails when python3 is the default. It's easy enought to fix by changing the shebang to /usr/bin/python2

Revision history for this message
Mattia Rizzolo (mapreri) wrote :

what version is this?

dput-ng has been using python3 since 1.18 since nearly 3 years ago on March 2018. And I haven't had any python3-specific bug report in years too.

So please tell what you see failing and how and which version.

Besides, I'm pretty sure trying to execute the current code with python2 would just fail too, since it's using py3-only stuff.

Changed in dput-ng (Ubuntu):
status: New → Incomplete
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Hello Mattia, thank you for your quick response and my apologies for the less than ideal bug report.

What I forgot to say is that my main system is Bionic which has python2 as default. I changed that to python3 and now dput fails. In bionic it has the shebang #!/usr/bin/python which works fine when python points to python2, but breaks when it points to python3. It is very easy to fix and I reported this for the sake of making life easier for other bionic users.

This should not be an issue in focal which I believe has python3 as default.

Revision history for this message
Mattia Rizzolo (mapreri) wrote :

> my main system is Bionic which has python2 as default

There is not concept of "default" python in debian-based systems. the `python` command is python2, period.

> I changed that to python3 and [...]

That's not a supported setup. You get to keep the pieces.

the move from the unversioned /usr/bin/python to /usr/bin/python2 started years after bionic was released, so it's not surprising. In fact, back then using /usr/bin/python2 in shebangs was discouraged and partially automatically changed to the unversioned variant during the build.

I recommend you at least move to focal, even better groovy if you wish to have a /usr/bin/python pointing to python3. In there at least most packages will use /usr/bin/python2 in their shebang as you are describing. Either way, having /usr/bin/python pointing to python3 is not really supported by us at this time.

Changed in dput-ng (Ubuntu):
status: Incomplete → Invalid
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.