classification
Title: idle pydoc et al removed from 3.1 without versioned replacements
Type: behavior Stage:
Components: Build Versions: Python 3.1
process
Status: closed Resolution: fixed
Dependencies: Superseder: Parts of Tkinter missing (but not when running from IDLE)
View: 5487
Assigned To: Nosy List: benjamin.peterson, dripton, kbk, ned.deily, ronaldoussoren, tarek
Priority: release blocker Keywords:

Created on 2009-04-14 20:24 by ned.deily, last changed 2009-05-25 07:57 by ned.deily. This issue is now closed.

Messages (13)
msg85973 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2009-04-14 20:24
RELEASE BLOCKER

r71400 and r71401 changed py3k setup.py to comment out the installation 
of the scripts for pydoc, idle, 2to5, and smtpd.py.  This was in 
response to issue1590 noting that python3 should not overwrite python2 
versions of the scripts.  However, unless I'm missing something, this 
now means that *no* versions of these scripts are ever installed for 
python3; that's not a solution.  (Note, this breaks Mac installer builds 
and probably breaks downstream unix packages as well.)

As hinted at in issue1590, the most consistent option would be to 
install each of the scripts with a version number as is done with python 
itself.

Whatever solution is chosen, some additional work will likely be needed 
in the Mac Makefile to do the right thing in the framework bin directory 
and in the Mac BuildScript/build-installer.py for the /usr/local/bin 
links. No idea about the effects on other platform builds.

This also seems to be a change worthy of a NEWS item and doc changes.
msg85976 - (view) Author: David Ripton (dripton) Date: 2009-04-14 20:45
issue1590 was only supposed to fix "make altinstall", which is a
secondary install target intended specifically to not break the primary
Python on a system.  I agree with Ned that if it changed the behavior of
"make install" then the change was broken.
msg86212 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-04-20 23:46
I think the scripts should just get a "3" appended to them in
installation. Unless distutils provides an easy way to do this, a patch
should probably just rename the scripts before installing them.
msg86223 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2009-04-21 07:44
Couldn't we just rename them in the repository? 

IIRC the name with a '3' suffix would be the official name for these tools 
in Python 3.x, which would make it more natural to change the name in the 
repository as well.

I don't know enough of svnmerge to know if renaming would be a problem for 
svnmerge.
msg86554 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-04-25 21:12
Installed pydoc and idle with a 3 suffix in r71936.
msg86598 - (view) Author: Kurt B. Kaiser (kbk) * (Python committer) Date: 2009-04-26 03:17
This may affect the Windows Installer, specifically
the IDLE shortcut and the "Edit with IDLE" right
click functionality.  See #5487.
msg88185 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2009-05-22 09:34
Reopening as RELEASE BLOCKER.

r71936 does indeed install pydoc and idle with a 3 suffix.  However, it 
also removed the 2to3 and smtp.py scripts previously installed by 
setup.py without providing any replacements for them, versioned or not.

Section 25.4.1 of the 3.1 Standard Library docs state "2to3 will usually 
be installed with the Python interpreter as a script. It is also located 
in the Tools/scripts directory of the Python root."

In the case of the OSX installer, as it stands now with r71936, there is 
no longer a 2to3 script in the framework bin directory and Tools/scripts 
is not installed.  So what's a user to do?  Is this also an issue for 
the Windows installers?  What about Linux/Unix distributions?  (For the 
OSX installer, I've also documented the problem in Issue5272).

This raises the issues of what is a sensible way to handle potential 
multiple versions of 2to3. Perhaps this has been discussed and decided 
elsewhere?  If not ...:

I see two scenarios of interest -

1. If a user has installed 2.6 (or newer 2.x), a 2to3 is already 
installed. But installing 3.x will(for 3.0)/should(for 3.1) install a 
3.x 2to3 script.  Should it supersede, co-exist with, or defer to the 
2.x version?

2. If a user is moving from 2.5 or earlier, to 3.x, the 3.x installation 
needs to unconditionally provide 2to3.

In the case of the interpreter, the reason for renaming to python3 is 
clear: python2 and python3 expect different input, produce different 
output, and need to co-exist.  In the case of 2to3, however, there 
shouldn't be any fundamental differences between the versions provided 
with a py2 or a py3 install other than bug fixes and potential new 
features, right?

If so, since the output of 2to3 is python3, one could make the case that 
the py3 installed 2to3 should take precedence over a py2 one, at least 
by default.  If there is the potential need for the user to be able to 
choose which 2to3 to use, then a user-friendly solution would be to have 
py2 and py3 install them as something like 2to3-2 and 2to3-3, 
respectively, and a 2to3 which would prefer 2to3-3 but fall back to 
2to3-2.  Otherwise, the py3k version could always just install as 2to3-3 
and it would be up to the user to know (with documentation help) about 
the potential two versions, since the py2 2to3 version is already out of 
the bag and in the field.  Or the py3 install could unilaterally 
supersede a py2 version, with the limitation that a new 2.6.x (re-
)install would likely cause a 2to3 revert, something that could be fixed 
in 2.7.

In any case, if this hasn't already happened, I think a decision needs 
to be made on how the 2to3 conflict should be handled so that at least 
*one* version of 2to3 is always available, ensuring that the solution 
makes sense for all of the major platforms, and making sure it gets 
implemented *and* properly documented prior to 3.1 release and, if 
necessary, the 2.7 release.

I'm less concerned about the removal of the smtpd.py script as I suspect 
it is little used and I don't know how it is handled by the all of the 
platforms (the OSX installer has provided it in bin up until now).  Does 
the smtpd script even appear in the documentation anywhere?  
Nevertheless, if it hasn't already happened, the impact of its removal 
should be assessed on the major platforms and, if it remains removed, at 
least that should be documented in What's New.
msg88187 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2009-05-22 10:06
Ned: the 2to3 is not installed anymore by the main makefiles, I don't know 
why.

I'm actually happy that smtpd.py isn't installed anymore, this always 
looked more like an example that a real tool to me.
msg88190 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2009-05-22 10:30
Ronald, no changes were made to the makefiles, just to setup.py in 
r71400 and r71936 (which also renamed idle and pydoc):

[...]
Modified: python/branches/py3k/setup.py
========================================================================
======
--- python/branches/py3k/setup.py	(original)
+++ python/branches/py3k/setup.py	Sat Apr 25 23:11:45 2009
@@ -1652,13 +1652,7 @@
           # called unless there's at least one extension module 
defined.
           ext_modules=[Extension('_struct', ['_struct.c'])],
 
-          # Scripts to install
-          # Commented out because we don't want them to override the 
2.x
-          # ones. See #1590.
-          scripts = []
-          #scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
-          #           'Tools/scripts/2to3',
-          #           'Lib/smtpd.py']
+          scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3"]
         )
 
 # --install-platlib
msg88192 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2009-05-22 10:47
Sorry, my assertion "no changes were made to the makefiles" is not quite 
correct.  r71372 did change the altinstall target for Issue1590, the 
precipitator of this issue.
msg88214 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-05-22 20:13
I don't think it matters which version of 2to3 is used. It has a same
function.
msg88244 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-05-23 17:13
r72866 installs 2to3 over old installations. That should do the trick.
msg88305 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2009-05-25 07:57
Yep, r72866 does restore 2to3.  And r72857, which removes the fullinstall 
target, also fixes the problem of unversioned "python" and "python-config" 
files being created in bin.  Thanks!
History
Date User Action Args
2009-05-25 07:57:42ned.deilysetmessages: + msg88305
2009-05-23 17:13:52benjamin.petersonsetstatus: open -> closed

messages: + msg88244
2009-05-22 20:13:25benjamin.petersonsetmessages: + msg88214
2009-05-22 10:47:08ned.deilysetmessages: + msg88192
2009-05-22 10:30:39ned.deilysetmessages: + msg88190
2009-05-22 10:06:47ronaldoussorensetmessages: + msg88187
2009-05-22 09:34:59ned.deilysetstatus: closed -> open

messages: + msg88185
2009-04-26 22:16:01ajaksu2linkissue4693 superseder
2009-04-26 03:17:07kbksetsuperseder: Parts of Tkinter missing (but not when running from IDLE)
messages: + msg86598
2009-04-26 01:51:03ajaksu2linkissue3896 superseder
2009-04-25 21:12:29benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg86554
2009-04-21 07:44:32ronaldoussorensetmessages: + msg86223
2009-04-20 23:47:30benjamin.petersonsetpriority: release blocker
2009-04-20 23:46:59benjamin.petersonsetnosy: + tarek
messages: + msg86212
2009-04-19 19:43:24kbksetnosy: + kbk
2009-04-14 20:45:58driptonsetnosy: + dripton
messages: + msg85976
2009-04-14 20:26:43ned.deilysetnosy: + ronaldoussoren, benjamin.peterson
2009-04-14 20:24:19ned.deilycreate