You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
idle pydoc et al removed from 3.1 without versioned replacements #50006
bpo-5487: Parts of Tkinter missing (but not when running from IDLE)
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2009-05-23.17:13:52.055>created_at=<Date2009-04-14.20:24:19.409>labels= ['type-bug', 'build', 'release-blocker']
title='idle pydoc et al removed from 3.1 without versioned replacements'updated_at=<Date2009-05-25.07:57:42.886>user='https://github.com/ned-deily'
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 bpo-1590 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 bpo-1590, 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.
bpo-1590 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.
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.
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.
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 bpo-5272).
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 -
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?
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.
--- 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 python/cpython#45931.- scripts = []- #scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',- # 'Tools/scripts/2to3',- # 'Lib/smtpd.py']+ scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3"]
)
# --install-platlib
Sorry, my assertion "no changes were made to the makefiles" is not quite
correct. r71372 did change the altinstall target for bpo-1590, the
precipitator of this issue.
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!
Activity
ned-deily commentedon Apr 14, 2009
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 bpo-1590 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 bpo-1590, 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.
dripton commentedon Apr 14, 2009
bpo-1590 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.
benjaminp commentedon Apr 20, 2009
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.
ronaldoussoren commentedon Apr 21, 2009
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.
benjaminp commentedon Apr 25, 2009
Installed pydoc and idle with a 3 suffix in r71936.
kbkaiser commentedon Apr 26, 2009
This may affect the Windows Installer, specifically
the IDLE shortcut and the "Edit with IDLE" right
click functionality. See bpo-5487.
ned-deily commentedon May 22, 2009
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 bpo-5272).
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 -
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?
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.
ronaldoussoren commentedon May 22, 2009
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.
ned-deily commentedon May 22, 2009
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
========================================================================
======
ned-deily commentedon May 22, 2009
Sorry, my assertion "no changes were made to the makefiles" is not quite
correct. r71372 did change the altinstall target for bpo-1590, the
precipitator of this issue.
benjaminp commentedon May 22, 2009
I don't think it matters which version of 2to3 is used. It has a same
function.
benjaminp commentedon May 23, 2009
r72866 installs 2to3 over old installations. That should do the trick.
ned-deily commentedon May 25, 2009
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!