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.
Reviewed: https:/ /review. openstack. org/161649 /git.openstack. org/cgit/ openstack/ glance/ commit/ ?id=27539859ece 47e4654736b905d 75de5399d25ccc
Committed: https:/
Submitter: Jenkins
Branch: master
commit 27539859ece47e4 654736b905d75de 5399d25ccc
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 /docs.python. org/2/library/ contextlib. html#contextlib .nested nested is also not compatible in Python 3.
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:/
contextlib.
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 cf6db8d11d3533e 4f8cf2053c2
Change-Id: Ic8edfa41d6c468