[Django] #23812: Use django.utils.six.moves.range instead of xrange

26 views
Skip to first unread message

Django

unread,
Nov 13, 2014, 4:12:56 AM11/13/14
to django-...@googlegroups.com
#23812: Use django.utils.six.moves.range instead of xrange
------------------------------------------------+------------------------
Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+------------------------
These imports are equivalent but by using range the code looks more like
Python 3 and has the advantage that we simply remove the import when the
time comes to drop Python 2.

--
Ticket URL: <https://code.djangoproject.com/ticket/23812>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 13, 2014, 12:28:14 PM11/13/14
to django-...@googlegroups.com
#23812: Use django.utils.six.moves.range instead of xrange
--------------------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by collinanderson):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/23812#comment:1>

Django

unread,
Nov 25, 2014, 10:03:47 AM11/25/14
to django-...@googlegroups.com
#23812: Use django.utils.six.moves.range instead of xrange
--------------------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by collinanderson):

* has_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/23812#comment:2>

Django

unread,
Dec 13, 2014, 5:41:35 AM12/13/14
to django-...@googlegroups.com
#23812: Use django.utils.six.moves.range instead of xrange
--------------------------------------+------------------------------------
Reporter: timgraham | Owner: mhall1
Type: Cleanup/optimization | Status: assigned

Component: Core (Other) | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by mhall1):

* owner: nobody => mhall1
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/23812#comment:3>

Django

unread,
Dec 13, 2014, 8:18:30 AM12/13/14
to django-...@googlegroups.com
#23812: Use django.utils.six.moves.range instead of xrange
--------------------------------------+------------------------------------
Reporter: timgraham | Owner: mhall1
Type: Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by mhall1):

The changes are available at
https://github.com/mhall1/django/tree/ticket_23812

--
Ticket URL: <https://code.djangoproject.com/ticket/23812#comment:4>

Django

unread,
Dec 13, 2014, 8:25:46 AM12/13/14
to django-...@googlegroups.com
#23812: Use django.utils.six.moves.range instead of xrange
--------------------------------------+------------------------------------
Reporter: timgraham | Owner: mhall1
Type: Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by mhall1):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/23812#comment:5>

Django

unread,
Dec 13, 2014, 12:46:37 PM12/13/14
to django-...@googlegroups.com
#23812: Use django.utils.six.moves.range instead of xrange
--------------------------------------+------------------------------------
Reporter: timgraham | Owner: mhall1
Type: Cleanup/optimization | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"895dc880ebef46c9577c6908daf283248685f73c"]:
{{{
#!CommitTicketReference repository=""
revision="895dc880ebef46c9577c6908daf283248685f73c"
Fixed #23812 -- Changed django.utils.six.moves.xrange imports to range
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23812#comment:6>

Django

unread,
Dec 13, 2014, 1:42:46 PM12/13/14
to django-...@googlegroups.com
#23812: Use django.utils.six.moves.range instead of xrange
--------------------------------------+------------------------------------
Reporter: timgraham | Owner: mhall1
Type: Cleanup/optimization | Status: closed
Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"bc88ec550afd5ce972b8c902572c6447d89c0cc9"]:
{{{
#!CommitTicketReference repository=""
revision="bc88ec550afd5ce972b8c902572c6447d89c0cc9"
Updated advice on six.moves.range/xrange; refs #23812.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23812#comment:7>

Django

unread,
Dec 13, 2014, 1:43:05 PM12/13/14
to django-...@googlegroups.com
#23812: Use django.utils.six.moves.range instead of xrange
--------------------------------------+------------------------------------
Reporter: timgraham | Owner: mhall1
Type: Cleanup/optimization | Status: closed
Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"e905d4984dbaca7e9175205d64ef8794fa7ded12"]:
{{{
#!CommitTicketReference repository=""
revision="e905d4984dbaca7e9175205d64ef8794fa7ded12"
[1.7.x] Updated advice on six.moves.range/xrange; refs #23812.

Backport of bc88ec550afd5ce972b8c902572c6447d89c0cc9 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23812#comment:8>

Django

unread,
Dec 13, 2014, 1:43:07 PM12/13/14
to django-...@googlegroups.com
#23812: Use django.utils.six.moves.range instead of xrange
--------------------------------------+------------------------------------
Reporter: timgraham | Owner: mhall1
Type: Cleanup/optimization | Status: closed
Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"89f9bf61bbbf8f5d2593c53ae3fbe45d8f110311"]:
{{{
#!CommitTicketReference repository=""
revision="89f9bf61bbbf8f5d2593c53ae3fbe45d8f110311"
[1.6.x] Updated advice on six.moves.range/xrange; refs #23812.

Backport of bc88ec550afd5ce972b8c902572c6447d89c0cc9 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23812#comment:9>

Reply all
Reply to author
Forward
0 new messages