[issue20762] SSLSocket.read() not documented

New submission from Enrico Bianchi: although exists, read() method isn't reported in the SSLSocket documentation. Please, fix it ---------- assignee: docs@python components: Documentation messages: 212115 nosy: docs@python, ebianchi priority: normal severity: normal status: open title: SSLSocket.read() not documented versions: Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue20762> _______________________________________

R. David Murray added the comment: That's because SSLSocket is a wrapper around a regular socket, and the read method is documented in the Socket documentation. You will notice that *only* SSL specific methods are documented in the SSLSocket documentation. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue20762> _______________________________________

R. David Murray added the comment: Oops. My mistake. It's been too long since I did any socket programming :( ---------- resolution: invalid -> stage: committed/rejected -> needs patch status: closed -> open _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue20762> _______________________________________

Antoine Pitrou added the comment: Hmm, yeah, this is actually intended. The read() and write() methods on SSLSocket are not intended to be a public API: you should call send() or recv() instead. Ideally we would deprecate the read() and write() methods and rename the internal helpers to _read() and _write(). Christian, what do you think? ---------- nosy: +christian.heimes, pitrou versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue20762> _______________________________________

Changes by Ezio Melotti <ezio.melotti@gmail.com>: ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue20762> _______________________________________

Christian Heimes added the comment: Sounds good, let's deprecate them with #28022. ---------- superseder: -> SSL releated deprecation for 3.6 versions: +Python 3.6, Python 3.7 -Python 3.5 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue20762> _______________________________________

Martin Panter added the comment: In the meantime, full documentation for the read() and write() methods was added for Python 3 in revision 61e52fda1006. The Python 2 documentation only mentions read() indirectly, in passing and in example code, and does not mention write(). But deprecating them makes sense to me. The essential functionality seems to already be available in the recv(), recv_into(), and send() or sendall() methods. The write() documentation is not clear regarding partial writes, in constrast with send() and sendall(). ---------- nosy: +martin.panter _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue20762> _______________________________________

Changes by Christian Heimes <lists@cheimes.de>: ---------- components: +SSL _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue20762> _______________________________________

Christian Heimes added the comment: I'll deprecate read() and write() in my upcoming PEP. ---------- resolution: -> later stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue20762> _______________________________________
participants (6)
-
Antoine Pitrou
-
Christian Heimes
-
Enrico Bianchi
-
Ezio Melotti
-
Martin Panter
-
R. David Murray