This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: NameError on 2to3 tool
Type: crash Stage:
Components: 2to3 (2.x to 3.x conversion tool) Versions: Python 3.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: alejolp, benjamin.peterson, djc
Priority: normal Keywords: patch

Created on 2009-07-03 12:33 by alejolp, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
2to3-xrange.patch alejolp, 2009-07-03 12:33
Messages (3)
msg90048 - (view) Author: Alejandro Santos (alejolp) Date: 2009-07-03 12:33
Using the -j switch of the 2to3 tool shiped with Python 3.1 final i'm
getting:

Traceback (most recent call last):
  File "/home/alejo/apps/local/bin/2to3", line 6, in <module>
    sys.exit(main("lib2to3.fixes"))
  File "/home/alejo/apps/local/lib/python3.1/lib2to3/main.py", line 132,
in main
    options.processes)
  File "/home/alejo/apps/local/lib/python3.1/lib2to3/refactor.py", line
553, in refactor
    for i in xrange(num_processes)]
NameError: global name 'xrange' is not defined

Attached patch seems to work fine.
msg90050 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-07-03 13:21
And that's what we get for not having unittests for the accursed
feature... Fixed in r73805.
msg90054 - (view) Author: Alejandro Santos (alejolp) Date: 2009-07-03 13:36
Thanks!!
History
Date User Action Args
2022-04-11 14:56:50adminsetgithub: 50655
2009-07-03 13:36:59alejolpsetmessages: + msg90054
2009-07-03 13:21:44benjamin.petersonsetstatus: open -> closed

nosy: + benjamin.peterson
messages: + msg90050

resolution: fixed
2009-07-03 12:33:28alejolpcreate