python 3 only has "__self__", the "im_self" should be replace by "__self_"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Wishlist
|
Shuangtai Tian | ||
Ironic |
Fix Released
|
Wishlist
|
Fengqian | ||
OpenStack Compute (nova) |
Won't Fix
|
Wishlist
|
Xurong Yang | ||
oslo-incubator |
Fix Released
|
Medium
|
David Stanek | ||
tuskar |
Fix Released
|
Medium
|
Fengqian |
Bug Description
for code compatible with Python 3, we should use the "__self__" instead of "im_self".
for example :
cinder/
def make_pretty_
"""Makes a pretty name for a function/method."""
meth_pieces = [method.__name__]
# If its an instance method attempt to tack on the class name
if hasattr(method, 'im_self') and method.im_self is not None:
try:
except AttributeError:
pass
return ".".join(
For reference here(thanks Alex for adding this):
"Changed in version 2.6: For Python 3 forward-
http://
Changed in cinder: | |
assignee: | nobody → Shuangtai Tian (shuangtai-tian) |
Changed in cinder: | |
status: | New → In Progress |
description: | updated |
Changed in ironic: | |
assignee: | nobody → Fengqian (fengqian-gao) |
status: | New → In Progress |
Changed in tuskar: | |
assignee: | nobody → Fengqian (fengqian-gao) |
Changed in tuskar: | |
status: | New → In Progress |
Changed in tuskar: | |
importance: | Undecided → Medium |
Changed in oslo: | |
assignee: | nobody → Xurong Yang (idopra) |
status: | New → In Progress |
Changed in nova: | |
assignee: | nobody → Xurong Yang (idopra) |
status: | New → In Progress |
Changed in tuskar: | |
status: | In Progress → Fix Committed |
Changed in nova: | |
importance: | Undecided → Wishlist |
Changed in tuskar: | |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | none → icehouse-3 |
status: | Fix Committed → Fix Released |
Changed in oslo: | |
importance: | Undecided → Medium |
Changed in ironic: | |
status: | In Progress → Fix Committed |
importance: | Undecided → Wishlist |
Changed in ironic: | |
milestone: | none → icehouse-rc1 |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | icehouse-3 → 2014.1 |
Changed in ironic: | |
milestone: | icehouse-rc1 → 2014.1 |
Changed in oslo: | |
assignee: | Xurong Yang (idopra) → David Stanek (dstanek) |
Changed in oslo: | |
status: | In Progress → Fix Committed |
Changed in oslo: | |
milestone: | none → juno-2 |
status: | Fix Committed → Fix Released |
For reference here:
"Changed in version 2.6: For Python 3 forward- compatibility, im_func is also available as __func__, and im_self as __self__." docs.python. org/2/reference /datamodel. html
http://