[openstack-dev] [nova] contextlib.nested and Python3 failing

Feodor Tersin ftersin at hotmail.com
Sun Aug 23 09:01:44 UTC 2015


> From: kevin.mitchell at rackspace.com
> 
> Actually, there should no longer be a need to use contextlib.nested.
> We've explicitly dropped Python 2.6 compatibility, which means we're
> expecting compatibility with Python 2.7+ only, and as of Python 2.7, the
> 'with' statement supports accepting multiple 'as' clauses.  The
> contextlib.nested tool was really only necessary to work around that
> functionality being missing in Python 2.6, and has been deprecated as of
> Python 2.7 because it's no longer necessary.

'with' statement has multiple form, but it does not allow line breaks inside. It leads to ugly formatting.See https://github.com/stackforge/ec2-api/commit/f5b320edbbc8ab554dae496dcae78be6fdd25fe7#diff-bfcbc316f2eb6b39de99a921a5753aadL631
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150823/b8b734ca/attachment.html>


More information about the OpenStack-dev mailing list