xrange not support in python3

Bug #1259978 reported by Wu Wenxiang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Low
Wu Wenxiang

Bug Description

xrange() was not support in python3.
xrange() in for loop could be replaced by range(), where no performance neck bottle.

Changed in keystone:
assignee: nobody → Wu Wenxiang (wu-wenxiang)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/61464

Changed in keystone:
status: New → In Progress
Revision history for this message
Dolph Mathews (dolph) wrote :

python 3 doesn't support xrange because py3's range is py2's xrange.

six should support 'range' which maps appropriately to both

Changed in keystone:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/61464
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=04b0c22c65d89d566b3775cf94d92266017bdb7a
Submitter: Jenkins
Branch: master

commit 04b0c22c65d89d566b3775cf94d92266017bdb7a
Author: Wu Wenxiang <wu.wenxiang@99cloud.net>
Date: Wed Dec 11 23:48:47 2013 +0800

    Replace xrange in for loop with range

    xrange is not supported in python 3, so replace it with six.moves.range

    Closes-Bug: #1259978

    Change-Id: I321380693d45f7d48f52da2d0f8e4c137763ab0c

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → icehouse-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: icehouse-2 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.