Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idle pydoc et al removed from 3.1 without versioned replacements #50006

Closed
ned-deily opened this issue Apr 14, 2009 · 13 comments
Closed

idle pydoc et al removed from 3.1 without versioned replacements #50006

ned-deily opened this issue Apr 14, 2009 · 13 comments
Labels
build The build process and cross-build release-blocker type-bug An unexpected behavior, bug, or error

Comments

@ned-deily
Copy link
Member

BPO 5756
Nosy @kbkaiser, @ronaldoussoren, @benjaminp, @tarekziade, @ned-deily
Superseder
  • 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 = None
    closed_at = <Date 2009-05-23.17:13:52.055>
    created_at = <Date 2009-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 = <Date 2009-05-25.07:57:42.886>
    user = 'https://github.com/ned-deily'

    bugs.python.org fields:

    activity = <Date 2009-05-25.07:57:42.886>
    actor = 'ned.deily'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-05-23.17:13:52.055>
    closer = 'benjamin.peterson'
    components = ['Build']
    creation = <Date 2009-04-14.20:24:19.409>
    creator = 'ned.deily'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 5756
    keywords = []
    message_count = 13.0
    messages = ['85973', '85976', '86212', '86223', '86554', '86598', '88185', '88187', '88190', '88192', '88214', '88244', '88305']
    nosy_count = 6.0
    nosy_names = ['kbk', 'ronaldoussoren', 'dripton', 'benjamin.peterson', 'tarek', 'ned.deily']
    pr_nums = []
    priority = 'release blocker'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = '5487'
    type = 'behavior'
    url = 'https://bugs.python.org/issue5756'
    versions = ['Python 3.1']

    @ned-deily
    Copy link
    Member Author

    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.

    @ned-deily ned-deily added build The build process and cross-build type-bug An unexpected behavior, bug, or error labels Apr 14, 2009
    @dripton
    Copy link
    Mannequin

    dripton mannequin commented 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
    Copy link
    Contributor

    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
    Copy link
    Contributor

    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
    Copy link
    Contributor

    Installed pydoc and idle with a 3 suffix in r71936.

    @kbkaiser
    Copy link
    Contributor

    This may affect the Windows Installer, specifically
    the IDLE shortcut and the "Edit with IDLE" right
    click functionality. See bpo-5487.

    @ned-deily
    Copy link
    Member Author

    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 -

    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.

    @ned-deily ned-deily reopened this May 22, 2009
    @ronaldoussoren
    Copy link
    Contributor

    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
    Copy link
    Member Author

    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 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

    @ned-deily
    Copy link
    Member Author

    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
    Copy link
    Contributor

    I don't think it matters which version of 2to3 is used. It has a same
    function.

    @benjaminp
    Copy link
    Contributor

    r72866 installs 2to3 over old installations. That should do the trick.

    @ned-deily
    Copy link
    Member Author

    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!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    build The build process and cross-build release-blocker type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants