Need Use built-in print() function instead of print statement

Bug #1226943 reported by ChangBo Guo(gcb) on 2013-09-18
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ceilometer
Undecided
ChangBo Guo(gcb)
Cinder
Undecided
ChangBo Guo(gcb)
Glance
Undecided
ChangBo Guo(gcb)
OpenStack Compute (nova)
Low
David Ripton
OpenStack Dashboard (Horizon)
Undecided
ChenZheng
OpenStack Heat
Fix Released
Undecided
ChangBo Guo(gcb)
OpenStack Identity (keystone)
Low
ChangBo Guo(gcb)
neutron
Wishlist
ChangBo Guo(gcb)

Bug Description

In python 3 print statement is not supported, so we should use only print() functions.
built-in function was introduce in python 2.6
http://www.python.org/dev/peps/pep-3105/

Note :This function is not normally available as a built-in since the name print is recognized as the print statement.
To disable the statement and use the print() function, use this future statement at the top of your module:
from __future__ import print_function

http://docs.python.org/2/library/functions.html#print

Changed in tempest:
assignee: nobody → ChangBo Guo (guochbo)

Fix proposed to branch: master
Review: https://review.openstack.org/47089

Changed in tempest:
status: New → In Progress

Fix proposed to branch: master
Review: https://review.openstack.org/47090

Changed in ceilometer:
assignee: nobody → ChangBo Guo (guochbo)
status: New → In Progress

Fix proposed to branch: master
Review: https://review.openstack.org/47092

Changed in cinder:
assignee: nobody → ChangBo Guo (guochbo)
status: New → In Progress

Fix proposed to branch: master
Review: https://review.openstack.org/47097

Changed in heat:
assignee: nobody → ChangBo Guo (guochbo)
status: New → In Progress

Fix proposed to branch: master
Review: https://review.openstack.org/47101

Changed in glance:
assignee: nobody → ChangBo Guo (guochbo)
status: New → In Progress

Fix proposed to branch: master
Review: https://review.openstack.org/47110

Changed in neutron:
assignee: nobody → ChangBo Guo (guochbo)
status: New → In Progress

Fix proposed to branch: master
Review: https://review.openstack.org/47112

Changed in keystone:
assignee: nobody → ChangBo Guo (guochbo)
status: New → In Progress
Dolph Mathews (dolph) on 2013-09-18
Changed in keystone:
importance: Undecided → Low

Reviewed: https://review.openstack.org/47092
Committed: http://github.com/openstack/cinder/commit/765e86e72f59994e029ccd1ad5ec3e50170ee128
Submitter: Jenkins
Branch: master

commit 765e86e72f59994e029ccd1ad5ec3e50170ee128
Author: Chang Bo Guo <email address hidden>
Date: Wed Sep 18 00:00:17 2013 -0700

    Use built-in print() instead of print statement

    In python 3 print statement is not supported, so we should use
    only print() functions.

    Fixes bug 1226943

    Change-Id: I7b2e4d52fe9050f6a67c44e4cc1237a15ea90b23

Changed in cinder:
status: In Progress → Fix Committed

Reviewed: https://review.openstack.org/47097
Committed: http://github.com/openstack/heat/commit/9aaddd5b48f8ce83591e7bba8a9141f98a65a60f
Submitter: Jenkins
Branch: master

commit 9aaddd5b48f8ce83591e7bba8a9141f98a65a60f
Author: Chang Bo Guo <email address hidden>
Date: Wed Sep 18 00:56:48 2013 -0700

    Use built-in print() instead of print statement

    In python 3 print statement is not supported, so we should use
    only print() functions.

    Fixes bug 1226943

    Change-Id: If88d77982ddbd1eb47265f15a27b747cd8011e76

Changed in heat:
status: In Progress → Fix Committed

Reviewed: https://review.openstack.org/47089
Committed: http://github.com/openstack/tempest/commit/c3fd15307b20a891ef194221c51ec1897355fd29
Submitter: Jenkins
Branch: master

commit c3fd15307b20a891ef194221c51ec1897355fd29
Author: Chang Bo Guo <email address hidden>
Date: Tue Sep 17 23:24:39 2013 -0700

    Use built-in print() instead of print statement

    In python 3 print statement is not supported, so we should use
    only print() functions.

    Fixes bug 1226943

    Change-Id: I05f042dc247ac117f6c2823d1326a88059875b79

Changed in tempest:
status: In Progress → Fix Committed
Changed in nova:
status: New → Confirmed
importance: Undecided → Low
Haomai Wang (haomai) on 2013-09-20
Changed in trove:
assignee: nobody → Haomai Wang (haomai)
no longer affects: trove

Reviewed: https://review.openstack.org/47110
Committed: http://github.com/openstack/neutron/commit/a37b4133b75439bfcdb0a2475d41752445adaa2a
Submitter: Jenkins
Branch: master

commit a37b4133b75439bfcdb0a2475d41752445adaa2a
Author: Chang Bo Guo <email address hidden>
Date: Wed Sep 18 02:35:53 2013 -0700

    Use built-in print() instead of print statement

    In python 3 print statement is not supported, so we should use
    only print() functions.

    This patch also removes print in unit test, left by accident

    Fixes bug 1226943

    Change-Id: I5ace50cb9e149682344b4c986ef9318f8dc50f72

Changed in neutron:
status: In Progress → Fix Committed

Reviewed: https://review.openstack.org/47090
Committed: http://github.com/openstack/ceilometer/commit/0135548dc4e7fe34475d977a3b62eaf707de0b64
Submitter: Jenkins
Branch: master

commit 0135548dc4e7fe34475d977a3b62eaf707de0b64
Author: Chang Bo Guo <email address hidden>
Date: Tue Sep 17 23:53:41 2013 -0700

    Use built-in print() instead of print statement

    In python 3 print statement is not supported, so we should use
    only print() functions.

    Fixes bug 1226943

    Change-Id: I206fe870eea21522e28318b9cfa062239e54c391

Changed in ceilometer:
status: In Progress → Fix Committed
tags: added: low-hanging-fruit
Changed in neutron:
importance: Undecided → Wishlist
milestone: none → havana-rc1
Thierry Carrez (ttx) on 2013-10-02
Changed in ceilometer:
milestone: none → havana-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) wrote : RC1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

 affects neutron
 status fixreleased
 milestone havana-rc1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSTSYaAAoJEFB6+JAlsQQjXp4P/jUOMyCJ8GqoaISlaRo9T/o+
oG7dKbJLAB+U7XZRuL20Wsnm86Hw3djzszkuG+KacHzyjMlda4OHeYo4Mk9yMwv0
5/j8X3luO04e7WUSzIPczHbOKrCyLJiQblMpG4QvSxJ4nxnIiqdlG3gJXzmRgRLF
QWxfCZ6S1V6vVWic9ZkeTNe9s+5wNWmPGG/UaIViPEwlYya+WcDEouliafvU5J83
Xxe9M/Vnr6HdchY9MndBC39zrV8LCmpc8a5Wm5KMP9FJYtQNZz20SJqlbgfXClx4
xW1yKjd+JQcmiP0ILC4ALCqbl5pM98Jn5RttI11P+ri1zvMgTP3yphPeYwnFL6Or
Ics7yIX5czVYspHeEfiMUzqVeiG3/6GMaICHhTQfW7ylL7634CtnWMfKvnu7HE/0
3AjFX6WSKt387HaZqaZWsyC8iu/VBpJAhCX/S++zqwdr5lRfDjqNDqrL4cSrXcYN
bhcOefDo0pLzjPELJoErN4l+qK8+NZGhUxHjN5GBbpxwRk1uQeI/E53muFt16Enz
hXH6Z1LmVe8x+L9qn7CJ5Rd2zpGYevrLlu9oeQEjBR4rAYnESqIJl79R1bXF+agF
e1b7g5r9/d/hVFUOyiEMQlKZ/nOfquFCkPZT1eXeiHXbiBKSlkmhDytfs0AVTxWy
HZTceAmemR/TmHHiW+8i
=YTjL
-----END PGP SIGNATURE-----

Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

 affects heat
 status fixreleased
 milestone havana-rc1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSTScoAAoJEFB6+JAlsQQjS0UP/iDm6lC3uGeSEqatCs8u2aj9
khUeOebiEGK1MCreLGMo5iFEMcv1Ya3jn1aK80XFQ2f/Co5xZpAm7lzuXp+MKrsV
NjnwCaSlhmj98shMXNwdMZJqmvzPLonwyZT7l38mRLxGqHw582vIdqAhff/t90ie
t4UqppdwVslE2Sty3/6fiiGZld/ZfBKJR3WJk2QLl2qOVnW3ykPoaX+zJFHPj1kR
ifybVWoo53CTaeFNQP317fEzfwegLBPelxGeq7h8YqHGyaFHQdIqRLyq0NVaFVF2
hry/H33e6bHm/M0Abr3murDLU6OnT2U/CGpyZPccD3+YTbfKn8rzJLknIOWDTmsL
gwyhzLgspW44fFe21mxFfI+R4RrLyiYtzrMRhs6DxgeDwuJQBxdliy68hzbImY6i
vBqFAJmEGai53Q0C4GPOfcTylwF195QuZcuZlhRhrodriu4QEFuDpQAFQIgLnCTH
3Vgd8gQZGe28b4mpiccKaykkOt3/1MlgttNqzKPQMrURE/g1bnbyW91pVhrx73kF
UrKMl3PCOKjwy4hWdYyE556RQsks/FficgGZ3cJuOu0UUiJYDV2NLNMkd7fQbua0
aXTP58Vqhuds+WpPaUlOm2vTXxjzcgfWX2nJFEiJR5xNpq4J9NUf/syKwftHSK+p
sscCkIo7Jaae8nYXKBxD
=nNP2
-----END PGP SIGNATURE-----

Changed in heat:
milestone: none → havana-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-04
Changed in cinder:
milestone: none → havana-rc1
status: Fix Committed → Fix Released
David Ripton (dripton) on 2013-10-08
Changed in nova:
assignee: nobody → David Ripton (dripton)

Fix proposed to branch: master
Review: https://review.openstack.org/50387

Changed in nova:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/50387
Committed: http://github.com/openstack/nova/commit/a52db496a5a8ac3ffd8598bf8bbe7e120b63d36b
Submitter: Jenkins
Branch: master

commit a52db496a5a8ac3ffd8598bf8bbe7e120b63d36b
Author: David Ripton <email address hidden>
Date: Tue Oct 8 11:13:45 2013 -0400

    Use print function rather than print statement

    This is for Python 3 compatibility, since Python 3 does not support
    the print statement, only the print function. (Python 2.6 and 2.7
    support both, depending on whether a __future__ import is used.)

    Paths containing "xen" were left alone, because of comments in a
    couple of the files indicating that the XenServer code needed to be
    compatible with Python 2.4.

    Fixes bug 1226943

    Change-Id: I23b804a4d99500b4acf81dd19645ab06dfcc9f1c

Changed in nova:
status: In Progress → Fix Committed

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

 affects ceilometer
 milestone 2013.2
 affects cinder
 milestone 2013.2
 affects glance
 milestone 2013.2
 affects keystone
 milestone 2013.2
 affects nova
 milestone 2013.2
 affects heat
 milestone 2013.2
 affects neutron
 milestone 2013.2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSX6scAAoJEFB6+JAlsQQjUIsP/04vYrk4cQqvXxk+Vt5OdGMZ
UiPyoVS1lzoB7rNM2KefCsw47cPwYTaZflXOKZieNIAft2VBAlL2vAJi4FzS1aZe
ySU12GafMTHyjXxoxksraPLp+0tKP36ZnlJ003Au2jVHxTMO8i2aBxCelMMPLA5U
NwGeo5QIiMn44/QSYSh33usl64AEVNLRTZtqjTl66KzEo3/2WmC/PV4gByT2AYeE
cddH6bpXousgaGONgoVdzjjjBOmh9WTSMA5WOQe3uhdAGCDgcOPZg6xMJQz1WQ2l
ILoWms7ilcygA9EAToy4w4pHa4hvuoGYl/RtQH6oV1aukhWIApqu8DmJ0BYZzDQY
eR0elSF3i4KoZeobY/+iv4ra6I2yhj+YSHwY58f6VqwNOOcKp+qbqXicavnWvZLQ
zMEFVBRuQ8NmbMfBQoGhWYw20iWY2hobAhb4MowdS2On4ta93Sd96uE8HD8T9sD5
hRueW6QRb0jUHtWeuRkL4pu23WbmMkvlQyJ5RyKg5LBg/0Ge4Bq3S5KLzPX2s5MJ
vX1pnbWqAdJDmQJnWfBbLE/JGcACpIZqUH8K37oEWucvUjHqw8y9fM24JJ+wjtwM
2b+fqHFpCImRiZv7xH80JSBKnkGidTU8w61fzOzzeIF3BrsOwJ9oltDitCeUv41O
1WZ95wbdYBmMLWwl9fj2
=YJdf
-----END PGP SIGNATURE-----

Changed in ceilometer:
milestone: havana-rc1 → 2013.2
Changed in cinder:
milestone: havana-rc1 → 2013.2
Changed in glance:
milestone: none → 2013.2
Changed in heat:
milestone: havana-rc1 → 2013.2
Changed in keystone:
milestone: none → 2013.2
Changed in neutron:
milestone: havana-rc1 → 2013.2
Changed in nova:
milestone: none → 2013.2
Thierry Carrez (ttx) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

 affects nova
 status fixreleased
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSX9W+AAoJEFB6+JAlsQQjL0kQAKD3VDZJu1sQKh1arwjqTy/R
txfbS7nQIdRS1rr4rwr2jhWBhAgXI2E6AsVM6W95UDf4Gk5A+dDDrQpPhqXFt/bZ
IgEiiRKyAHWmhoBsiowvpE7amDT584uvnLoWZtFOoCwSk2l6ak1hO5TajL2GUXY5
q7HU7Ot0dDSN/WIIjIqw0Jzfcm6irK+QwgpddcoaBQW92WK9Ye+EH/mYDzmGExOx
s/scXmD8+89+bWF9Z/7Q/88NaaVB8JUmOfop1utpwQuXonB6dqf0W/9Dk0EgRehM
w/+0ZvswadVkUnT5Nz/pBUjd2VFCaHz4FvTtL3tGHpIweMVLZD/rJK/hiPIF3cxq
/oWCG8/qqSgEAe5q2zro1wvjpHgu+SYAO41GPR2AjbPzd/ClDmCKLvqGm8Eaa35d
KJCxtYN8stfWtEP3GHhXoIToXJ0mUkm3JttDOexfARioW0XlNdMkjUMW94LzYWtV
bOtIJHNVy3VF+qSoxJHYD1/CYwxY+z8hKTzlNnIRQoO/6FUtygqmRF2ijfnQq5yH
Tkz5ZvkiQcvc4V/aSU4UniS4w85oDx/qEF1kdRWX480jeJIpljBF5g/rY7WdzR7M
/hADUkSlYTOfsWz9d0jaY0SmSeUh73OaOvFV3J1dETEj8nAZeCXosCIvJ65xBjAw
vQtHCS3gJoF0IsYw2iaY
=aCeQ
-----END PGP SIGNATURE-----

Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in keystone:
milestone: 2013.2 → none
Changed in glance:
milestone: 2013.2 → none

Reviewed: https://review.openstack.org/47101
Committed: http://github.com/openstack/glance/commit/e8e293d43e2c62c6cdeac046e13df454ea25d9b4
Submitter: Jenkins
Branch: master

commit e8e293d43e2c62c6cdeac046e13df454ea25d9b4
Author: Chang Bo Guo <email address hidden>
Date: Wed Sep 18 01:21:00 2013 -0700

    Use built-in print() instead of print statement

    In python 3 print statement is not supported, so we should use
    only print() functions.

    Fixes bug 1226943

    Change-Id: I0ae4cc7e5996ed30c69e153ba51438c56e56c09a

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-12-04
Changed in glance:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Sean Dague (sdague) on 2013-12-12
no longer affects: tempest
ChenZheng (chen-zheng) on 2014-02-25
Changed in horizon:
assignee: nobody → ChenZheng (chen-zheng)
status: New → In Progress
Xurong Yang (idopra) on 2014-03-14
Changed in trove:
assignee: nobody → Xurong Yang (idopra)
status: New → In Progress
Sushil Kumar (sushil-kumar2) wrote :

So to make it python 3 compatible we should pursue with this function.

Reviewed: https://review.openstack.org/76129
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=20c63e7e30360939d4a9a060b079e87946cd9735
Submitter: Jenkins
Branch: master

commit 20c63e7e30360939d4a9a060b079e87946cd9735
Author: ChenZheng <email address hidden>
Date: Tue Feb 25 17:12:09 2014 +0800

    Use built-in print() instead of print statement

    In python 3 print statement is not supported, so we should use
    only print() functions.

    Fixes bug 1226943

    Change-Id: I721e67c917ba7018401ad40ef30081883dcec420

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2014-04-17
Changed in glance:
milestone: icehouse-1 → 2014.1
no longer affects: trove
Morgan Fainberg (mdrnstm) wrote :

I am unsure when Keystone made the conversion over to print() exclusively from 'print' statements, however, I can confirm this is now the case. It looks like it occurred during the Icehouse cycle.

Changed in keystone:
status: In Progress → Fix Released
Thierry Carrez (ttx) on 2014-06-11
Changed in horizon:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-10-16
Changed in horizon:
milestone: juno-1 → 2014.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers