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

TelnetPopen3, TelnetBase, Expect split #38199

Closed
lkcl mannequin opened this issue Mar 22, 2003 · 7 comments
Closed

TelnetPopen3, TelnetBase, Expect split #38199

lkcl mannequin opened this issue Mar 22, 2003 · 7 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@lkcl
Copy link
Mannequin

lkcl mannequin commented Mar 22, 2003

BPO 708007
Nosy @terryjreedy, @jackdied, @tiran
Files
  • telnetlib.tgz: patched and split telnetlib
  • 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 = 'https://github.com/jackdied'
    closed_at = <Date 2013-03-25.20:34:19.151>
    created_at = <Date 2003-03-22.13:34:34.000>
    labels = ['type-feature', 'library']
    title = 'TelnetPopen3, TelnetBase, Expect split'
    updated_at = <Date 2013-03-25.20:34:19.132>
    user = 'https://bugs.python.org/lkcl'

    bugs.python.org fields:

    activity = <Date 2013-03-25.20:34:19.132>
    actor = 'terry.reedy'
    assignee = 'jackdied'
    closed = True
    closed_date = <Date 2013-03-25.20:34:19.151>
    closer = 'terry.reedy'
    components = ['Library (Lib)']
    creation = <Date 2003-03-22.13:34:34.000>
    creator = 'lkcl'
    dependencies = []
    files = ['5113']
    hgrepos = []
    issue_num = 708007
    keywords = ['patch']
    message_count = 7.0
    messages = ['43113', '59180', '66786', '67548', '85038', '114228', '185231']
    nosy_count = 5.0
    nosy_names = ['terry.reedy', 'lkcl', 'jackdied', 'christian.heimes', 'BreamoreBoy']
    pr_nums = []
    priority = 'normal'
    resolution = 'rejected'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue708007'
    versions = ['Python 3.2']

    @lkcl
    Copy link
    Mannequin Author

    lkcl mannequin commented Mar 22, 2003

    A reordering / code-split of Telnet in telnetlib.py
    into Expect (the lowest base class), TelnetBase, Telnet
    and TelnetPopen4.

    Reason: Expect contains all of the read_xxx(),
    expect(), write() and select() functions (and the
    interact() and mt_interact())

    TelnetPopen4 and Telnet derive from the same TelnetBase
    class, and there is nothing stopping anyone from
    writing a TelnetHTTP or TelnetURL class which will all
    have the same interface: expect() and write() and even
    interact()!

    weird, huh - typing in URLs and getting the content
    back, interactively :)

    these TelnetXXX classes are all incredibly useful for
    "remote host management" purposes; also the principle
    of the TelnetHTTP class is very useful for doing
    automated testing of web sites. send URL, expect text
    in it before proceeding with next URL (e.g. login,
    check to see if login failed or succeeded; react
    accordingly).

    @lkcl lkcl mannequin added stdlib Python modules in the Lib dir labels Mar 22, 2003
    @tiran
    Copy link
    Member

    tiran commented Jan 3, 2008

    Are you still interested in the matter? Please discuss the idea on the
    python-dev mailing list and possible create a new patch for Python 2.6.

    @tiran tiran closed this as completed Feb 19, 2008
    @tiran tiran closed this as completed Feb 19, 2008
    @lkcl
    Copy link
    Mannequin Author

    lkcl mannequin commented May 13, 2008

    finally! i accidentally found this, when looking for my own work for
    yet another project that requires this split.

    comments - several

    1. the patch was relevant in 2001 at the time of creation; it was
      relevant for python 2.0, 2.1, 2.2, 2.3 2.4 2.5 and is still relevant now.

    2. out of all of the python projects that i've done, some of which were
      really quite large (for one person), over half of them have required
      interaction with other programs - complex interaction - that required
      the telnetpopen class.

    calling out to php, calling out to c programs and using python to
    perform parallelisation of simple scripts onto multiple systems (a
    simple version of beowulf clustering), calling out to ssh to manage
    remote servers - the list goes on.

    1. the changes that guido asked me to make, back in 2001, we talked at
      cross purposes (and i wasn't up to the task of saying so - sorry guido!).

    the changes to split along the expectlib and telnetbase classes have
    nothing to do whatsoever with the telnet "protocol". in fact, the
    enhancements that i've made _totally_ isolate the telnet protocol itself
    into the "Telnet" derived class, and it can clearly be seen that
    absolutely zero changes to the underlying implementation of the telnet
    "protocol" are touched.

    however, guido was asking me, as part of the acceptance of the changes,
    to perform what he believed would be some "simple" bug-fixes to the
    actual _inner workings_ of the (original) telnet code, which required
    detailed knowledge of the telnet _protocol_ which i simply ... did not
    have. something to do with IAC.

    on the basis of this miscommunication, guido's decision (seen in
    http://bugs.python.org/issue405228) was to close the issue and reject
    the code.

    however - there is absolutely nothing "irrelevant" about the
    enhancements, and the original reasons for rejection have absolutely
    nothing to do with the enhancements.

    overall, these enhancements should never have been left to rot - there
    was never any real reason to leave them for so long, unused; the
    "expect" command - see wikipedia page - has been available since 1995
    and the concept is clearly well-understood as being extremely powerful;
    many many people in the intervening years since 2001 have written expect
    libraries in python - e.g. http://www.noah.org/wiki/Pexpect

    that one library alone - pexpect - would not need to have been written,
    if this patch had been accepted at the time it was written.

    @benjaminp benjaminp reopened this May 30, 2008
    @benjaminp benjaminp reopened this May 30, 2008
    @gvanrossum
    Copy link
    Member

    Since Pexpect is alive and well, doesn't it satisfy your needs? What's
    the point of trying to push an alternative implementation that has
    lingered for 7 years now?

    @jackdied
    Copy link
    Contributor

    jackdied commented Apr 1, 2009

    assigning all open telnetlib items to myself

    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Aug 18, 2010

    Is there any interest in seeing the patch updated for py3k? Any comments from Windows users since Pexpect uses pty which is Linux only?

    @BreamoreBoy BreamoreBoy mannequin added the type-feature A feature request or enhancement label Aug 18, 2010
    @terryjreedy
    Copy link
    Member

    As per Guido's core-mentorship list post: "Please close"

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    5 participants