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: Tools\Scripts\2to3.py broken under 3.0 rc1 Windows
Type: Stage:
Components: 2to3 (2.x to 3.x conversion tool) Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: collinwinter Nosy List: arnaud.faucher, benjamin.peterson, collinwinter, loewis
Priority: normal Keywords:

Created on 2008-09-28 15:20 by arnaud.faucher, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg73974 - (view) Author: (arnaud.faucher) Date: 2008-09-28 15:20
Under Windows (using the MSI), 2to3.py is outdated.

http://svn.python.org/view/sandbox/trunk/2to3/ contains the working
version (rev. 66173)
msg73975 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-09-28 16:19
Could you explain what you mean be outdated please? It looks correct to
me in the tag.
http://svn.python.org/view/python/tags/r30rc1/Tools/scripts/2to3?rev=66500&view=markup
msg73977 - (view) Author: (arnaud.faucher) Date: 2008-09-28 17:03
On a fresh win32 installation (using the 3.0rc1 MSI), the C:\Python30
\Tools\Scripts\2to3.py file contents is as follows:

------------------------------------------
#!/usr/bin/env python
from lib2to3 import refactor
import sys

sys.exit(refactor.main())
------------------------------------------

This version throws an error as follows:

------------------------------------------
C:\Python30\Tools\Scripts>C:\Python30\python.exe 2to3.py
Traceback (most recent call last):
  File "2to3.py", line 5, in <module>
    sys.exit(refactor.main())
AttributeError: 'module' object has no attribute 'main'
------------------------------------------


It seems that the '.py' extendion of the 2to3 script was removed some 
time ago.

Perhaps the MSI build process uses an old version of '2to3.py' and not 
the newer version of '2to3' (without the '.py' extension) ?
msg73980 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-09-28 18:04
It was indeed the case that I had been packaging an unversioned file. I
don't recall the details; most likely, it was a quick work-around for
2to3 not having a .py extension, yet the MSI generator only
incorporating .py files from Scripts.

I'll look into it.
msg74124 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-10-01 11:22
This is now fixed in r66710 and r66711.
History
Date User Action Args
2022-04-11 14:56:39adminsetgithub: 48239
2008-10-01 11:22:54loewissetstatus: open -> closed
resolution: fixed
messages: + msg74124
2008-09-28 18:04:23loewissetnosy: + loewis
messages: + msg73980
2008-09-28 17:03:19arnaud.fauchersetmessages: + msg73977
2008-09-28 16:19:27benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg73975
2008-09-28 15:20:49arnaud.fauchercreate