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

Improvements in 'telnetlib' #34325

Closed
bbrox mannequin opened this issue Apr 14, 2001 · 3 comments
Closed

Improvements in 'telnetlib' #34325

bbrox mannequin opened this issue Apr 14, 2001 · 3 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@bbrox
Copy link
Mannequin

bbrox mannequin commented Apr 14, 2001

BPO 416079
Nosy @loewis
Files
  • PATCH: patch for 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/loewis'
    closed_at = <Date 2001-09-06.08:54:44.000>
    created_at = <Date 2001-04-14.07:54:34.000>
    labels = ['library']
    title = "Improvements in 'telnetlib'"
    updated_at = <Date 2001-09-06.08:54:44.000>
    user = 'https://bugs.python.org/bbrox'

    bugs.python.org fields:

    activity = <Date 2001-09-06.08:54:44.000>
    actor = 'loewis'
    assignee = 'loewis'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2001-04-14.07:54:34.000>
    creator = 'bbrox'
    dependencies = []
    files = ['3266']
    hgrepos = []
    issue_num = 416079
    keywords = ['patch']
    message_count = 3.0
    messages = ['36354', '36355', '36356']
    nosy_count = 2.0
    nosy_names = ['loewis', 'bbrox']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue416079'
    versions = []

    @bbrox
    Copy link
    Mannequin Author

    bbrox mannequin commented Apr 14, 2001

    This patch does the following :

    • fix the debug string output when receiving telnet
      commands (the 'c' was reprinted whereas it's 'opt' that
      we want to see on the screen)

    • added all the telnet options known to arpa/telnet.h

    • added the possibility for the user to have it's own
      option negotiation callback, thus overriding Python's
      default WILL/WONT => DONT, DO/DONT => WONT behaviour

    Now, on a design perspective, I did not know what was
    best : do as I did or add a __default_callback function
    in the telnetlib file that would do the default
    behavious and thus preventing the 'if callback:' tests.

    @bbrox bbrox mannequin closed this as completed Apr 14, 2001
    @bbrox bbrox mannequin assigned loewis Apr 14, 2001
    @bbrox bbrox mannequin added the stdlib Python modules in the Lib dir label Apr 14, 2001
    @bbrox bbrox mannequin closed this as completed Apr 14, 2001
    @bbrox bbrox mannequin assigned loewis Apr 14, 2001
    @bbrox bbrox mannequin added the stdlib Python modules in the Lib dir label Apr 14, 2001
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Jul 28, 2001

    Logged In: YES
    user_id=21627

    The patch looks good, but I'd like you to improve
    standards conformance of the telnet options. I.e. you
    should document which version of arpa/telnet.h you've used
    as a basis. In addition, you should consider adding telnet
    options not listed in this file.

    In the past, they were all collected in an RFC; the last
    one who did this was RFC 2400. Now, IANA has a separate
    table, http://www.iana.org/assignments/telnet-options.

    I recommend that you add all those constants in addition
    to their telnet.h names, e.g. TOPT_XDL, TOPT_3270,
    TOPT_X_3.

    As for the callback design: Another option would be to
    allow subclassing the telnet class, e.g. a self.do_option
    method. I'm not sure what it best here, your current
    approach seems fine.

    Please also try to draft a patch for
    Doc/lib/libtelnetlib.tex. At a minimum, this should
    document the callback and the existence of the constants;
    if possible, it should give an example of option
    negotiation.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Sep 6, 2001

    Logged In: YES
    user_id=21627

    Thanks for the patch. I've added the additional
    IANA-registered options; if there is any interest,
    suboptions may be added to the module as well.

    Committed as telnetlib.py 1.15, libtelnetlib.tex 1.8, NEWS
    1.234.

    @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
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants