Switch to Python 3

Bug #1253458 reported by Barry Warsaw
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
byobu
Fix Released
Low
Dustin Kirkland 
byobu (Ubuntu)
Fix Released
High
Dustin Kirkland 
Trusty
Fix Released
High
Dustin Kirkland 

Bug Description

AFAICT, there are only two Python scripts in byobu, byobu-select-session and byobu-config. Both are currently shebanged to /usr/bin/python, but both are compatible with Python afaict. Since we're trying to get rid of Python 2 as much as possible, it would be great both of these scripts were shebanged to /usr/bin/python3. I think the only other change in the Debian packaging would be to Depend on python3-newt, which is in the archive, so yay! I tested these changes locally and it all seemed to work.

Once this is done in Trusty, one of just three server task packages will be converted, leaving only vim (for which I have a Debian bug and patch open) and landscape-common.

I could submit a branch, but I think you'll have no trouble with the quite trivial changes. Let me know.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hey Barry, yeah, no need to propose a merge or a patch.

One question for you... Would these changes be backward compatible to Lucid (10.04)? I maintain ppa:byobu/ppa which builds the same bits for each currently supported Ubuntu release?

I wouldn't want to introduce a change that would break working functionality on these older versions of Ubuntu...

Changed in byobu:
importance: Undecided → Low
status: New → Incomplete
assignee: nobody → Dustin Kirkland  (kirkland)
Revision history for this message
Barry Warsaw (barry) wrote :

It's been a little difficult to test since I only have Lucid chroots available and I can't seem to get byobu to run in the chroot from the ppa. But Lucid has Python 3.1.2 so the trick is to make sure the packages are compatible with that version of Python. I'll bet that if you're compatible currently with 2.7 and 3.3 you're probably compatible with 3.1.2 also.

Here's the one gotcha though: python3-newt is not available on Lucid, while python-newt is. That's what gives you the snack module. I tried quickly building Trusty's newt package on Lucid and it failed so I don't know how hard it will be to get a python3-newt on Lucid. It might be easier to backport the packaging changes from Trusty into Lucid's newt. Yeah, sorry that's more work of course.

Maybe one other option is to use somthing like lsb_release -cs to determine whether to use Python 2 or 3, but then things do get more complicated. It's worth getting Python 2 off the server task to spend some time on this. Let me know if you want to give that a go or would prefer me to try it.

Barry Warsaw (barry)
Changed in byobu:
status: Incomplete → New
Changed in byobu:
status: New → In Progress
Changed in byobu (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Dustin Kirkland  (kirkland)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package byobu - 5.69-0ubuntu1

---------------
byobu (5.69-0ubuntu1) trusty; urgency=low

  * debian/control:
    - revert build-dep on python-support, lintian is dumb sometimes
 -- Dustin Kirkland <email address hidden> Mon, 16 Dec 2013 22:29:52 -0700

Changed in byobu (Ubuntu Trusty):
status: In Progress → Fix Released
Changed in byobu:
status: In Progress → 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.