Comment 5 for bug 1428424

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/161649
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=27539859ece47e4654736b905d75de5399d25ccc
Submitter: Jenkins
Branch: master

commit 27539859ece47e4654736b905d75de5399d25ccc
Author: ChangBo Guo(gcb) <email address hidden>
Date: Thu Mar 5 17:31:56 2015 +0800

    Remove use of contextlib.nested

    The contextlib.nested call has been deprecated
    in Python 2.7. This causes DeprecationWarning
    messages in the unit tests.

    There are also known issues with contextlib.nested
    that were addressed by the native support for
    multiple "with" variables. For instance, if the
    first object is created but the second one throws
    an exception, the first object's __exit__ is never
    called. For more information see
    https://docs.python.org/2/library/contextlib.html#contextlib.nested
    contextlib.nested is also not compatible in Python 3.

    Since Glance no longer supports 2.6 we can remove
    the use of these contextlib.nested calls.

    Added hacking check to catch if any new instances
    are added to the codebase.

    Closes-Bug: #1428424
    Change-Id: Ic8edfa41d6c468cf6db8d11d3533e4f8cf2053c2