Work with Python print functionality on 2 and 3
Bug #1018611 reported by
Brian Curtin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Ubuntu Single Sign On Client | Status tracked in Trunk | |||||
Stable-4-0 |
Fix Released
|
Undecided
|
Unassigned | |||
Trunk |
Fix Released
|
Undecided
|
Brian Curtin | |||
ubuntu-sso-client (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | |||
Quantal |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Python 3 moved the print statement to be the print function, so "print foo" becomes a syntax error on Python 3. We can use the "from __future__ import print_function" import to force Python 2 to work the same way as Python 3 in regards to printing.
Related branches
lp:~brian.curtin/ubuntu-sso-client/py3-print
- dobey (community): Approve
- Alejandro J. Cura (community): Approve
-
Diff: 76 lines (+9/-6)2 files modifiedubuntu_sso/networkstate/tests/run_nwmgr_standalone.py (+2/-1)
ubuntu_sso/utils/tests/test_tcpactivation.py (+7/-5)
To post a comment you must log in.
This bug was fixed in the package ubuntu-sso-client - 3.99.2-0ubuntu1
---------------
ubuntu-sso-client (3.99.2-0ubuntu1) quantal; urgency=low
* New upstream release. ubuntu- sso-client- gtk.install:
- Avoid using /usr/bin/env python in scripts. (LP: #984089)
- Avoid using xrange, which is not in Python 3. (LP: #1016774)
- Handle winreg vs. _winreg for Python 2 and 3. (LP: #1016957)
- Remove the GTK+ UI. (LP: #1017690)
- Handle urllib differences between Python 2 and 3. (LP: #1018587)
- Use io.StringIO everywhere, for Python 2 and 3. (LP: #1018599)
- Use new print syntax for Python 3. (LP: #1018611)
* debian/control:
- Remove the -gtk UI package, and update the deps.
* debian/
- Removed.
-- Rodney Dawes <email address hidden> Fri, 20 Jul 2012 12:49:23 -0400