Reviewed: https://review.openstack.org/268059 Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=9cc2b79301d73929c6f673b4314950b8e0013a70 Submitter: Jenkins Branch: master
commit 9cc2b79301d73929c6f673b4314950b8e0013a70 Author: Ankit Agrawal <[email protected]> Date: Fri Jan 15 01:56:56 2016 -0800 Python 3: Replace reduce and xrange with six.moves 1. Builtin function 'reduce' in Python 2 has been moved to standard library module in Python 3 [1]. To make code compatible, replaced reduce(expr) with six.moves.reduce(expr). 2. xrange is renamed to range in Python 3, replaced it with six.moves.range 3. Added __bool__() method in FeatureState class to make it python 3 compatible because Python 3 calls the __bool__() method instead of __nonzero__ when evaluating an instance in a boolean context. 4. Added this test case to tests-py3.txt. [1] http://python3porting.com/stdlib.html#moved-builtins Closes-Bug: 1530249 Change-Id: I376cd643b9f58358a3e147532dafe77a7325a114 ** Changed in: cinder Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to Glance. https://bugs.launchpad.net/bugs/1530249 Title: Use six.moves.reduce instead of builtin reduce Status in Cinder: Fix Released Status in Glance: Fix Released Bug description: Builtin function 'reduce' in Python 2 has been moved to standard library module in Python 3 [1]. To make code compatible, we should replace reduce(expr) with six.moves.reduce(expr) [1] http://python3porting.com/stdlib.html#moved-builtins To manage notifications about this bug go to: https://bugs.launchpad.net/cinder/+bug/1530249/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

