This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: telnetlib: process_rawq() and binary data
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: mwalle, r.david.murray, terry.reedy
Priority: normal Keywords: patch

Created on 2015-10-07 13:17 by mwalle, last changed 2022-04-11 14:58 by admin.

Files
File name Uploaded Description Edit
telnetlib.diff mwalle, 2015-10-07 13:17
Messages (2)
msg252472 - (view) Author: Michael Walle (mwalle) Date: 2015-10-07 13:17
The process_rawq() discards '\x00' and '\x11' bytes.

At least the '\x00' byte is specified by the standard as a No-Op. So this is standard conform according to RFC 854. But there is also the binary transmission mode for telnet (RFC 856). If I want to support this mode I have to receive these all bytes (just IACs are handled special) and I don't see a possibility to achieve this other that overwriting the process_rawq() method, which essentially means copying it and remove/replace the "if c == theNULL" etc checks. IMHO this is bad, because i copy a 64 lines method, just to modify two lines :(

I'd propose to move these checks to a new method, which then can be overwritten. See attached file for example.
msg252636 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-10-09 19:07
A new method is an API change is an enhancement only allowed in a future version. If this is the only change needed to support another RFC also, the idea seems plausible, but I am not an Inet protocol expert.  
https://tools.ietf.org/html/rfc854.html
https://tools.ietf.org/html/rfc856.html
https://tools.ietf.org/html/rfc5198 proposed 854 update for unicode
History
Date User Action Args
2022-04-11 14:58:22adminsetgithub: 69521
2015-10-09 19:07:47terry.reedysetversions: - Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5
nosy: + r.david.murray, terry.reedy

messages: + msg252636

type: behavior -> enhancement
stage: patch review
2015-10-07 13:17:10mwallecreate