← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1524990] Re: safe_utils.getcallargs does not match inspect.getcallargs

 

Reviewed:  https://review.openstack.org/255572
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=2910d75b28afd909af3b4ac392729ac3d5e64b65
Submitter: Jenkins
Branch:    master

commit 2910d75b28afd909af3b4ac392729ac3d5e64b65
Author: Andrew Laski <andrew.laski@xxxxxxxxxxxxx>
Date:   Wed Dec 9 17:12:29 2015 -0500

    Fix use of safeutils.getcallargs
    
    The getcallargs method was written under the assumption that self was
    not passed in as an argument even if the function being introspected
    took self as an argument.  Since safeutils.getcallargs is modeled on
    inspect.getcallargs which does require self to be passed in the wrong
    interface was being provided.
    
    The initial user of getcallargs was therefore calling it incorrectly and
    this usage was copied to other places.  However this led to strange
    failures when someone attempted to call the method correctly.  So this
    patch fixes callers of getcallargs, and removes some code from the
    implementation that is not necessary once the usage is fixed.
    
    Change-Id: I86eb59a2280961b809c1b4680012fab9566d60db
    Closes-Bug: 1524990


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1524990

Title:
  safe_utils.getcallargs does not match inspect.getcallargs

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  safeutils.getcallargs was written when python2.6 was supported and did
  not have inspect.getcallargs.  It was intended to be a simplified
  version that could be replaced when python2.6 support was dropped and
  inspect.getcallargs was ubiquitous.  However the interface that
  safe_utils.getcallargs provides did not match inspect.getcallargs
  around the handling of the self parameter needing to be passed in.  It
  should be brought inline with inspect.getcallargs so that it can be
  dropped.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1524990/+subscriptions


References