References to im_class.__name__ are not compatible with python3

Bug #1418643 reported by Tom Cameron
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Low
David Stanek

Bug Description

References to im_class.__name__ will need to be changed to __self__.__class__.__name__.

For example, in notifications.py references to callback.im_class.__name__ should be callback.__self__.__class__.__name__.

https://github.com/openstack/keystone/blob/4f0107e43491ec5ed829b83eae7be32fea5ba659/keystone/notifications.py#L137-L143

Tags: python3
Revision history for this message
Tom Cameron (drdabbles) wrote :

This bug report was requested as part of comments from Boris Bobrov in https://review.openstack.org/#/c/147313

Changed in keystone:
importance: Undecided → Low
description: updated
Matthieu Huin (mhu-s)
Changed in keystone:
assignee: nobody → Matthieu Huin (mhu-s)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Changed in keystone:
status: New → In Progress
Changed in keystone:
milestone: none → kilo-rc1
Changed in keystone:
milestone: kilo-rc1 → none
Changed in keystone:
assignee: Matthieu Huin (mhu-s) → David Stanek (dstanek)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/158777
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=dbb98ef7dbf85c3e03caa54250283c05d9087732
Submitter: Jenkins
Branch: master

commit dbb98ef7dbf85c3e03caa54250283c05d9087732
Author: Matthieu Huin <email address hidden>
Date: Tue Feb 24 17:29:21 2015 +0100

    Get method's class name in a python3-compatible way

    This way of getting an instance method's class name does not rely on
    the im_class attribute and is compatible with any version of python
    after 2.7

    Co-Authored-By: David Stanek <email address hidden>
    Change-Id: I7fffa2ec3c5fd68b8d36324ded6f58f26a93d419
    Closes-Bug: 1418643

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → liberty-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: liberty-rc1 → 8.0.0
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.