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.

Author animus
Recipients animus, christian.heimes, docs@python, pitrou, shevek
Date 2014-05-13.10:49:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1399978151.14.0.0324160818786.issue21430@psf.upfronthosting.co.za>
In-reply-to
Content
Ok. As https://docs.python.org/dev/library/ssl.html#notes-on-non-blocking-sockets says: "Calling select() tells you that the OS-level socket can be read from (or written to)", and here is situation: len(select([ssl_socket],[],[], 0.2)[0]) returns 0, but ssl layer has pending data and "SSLWantWriteError or SSLWantReadError instead of BlockingIOError" are not raised, because there is no error.. How should app know what it's need to do another recv() call? Are You suggesting to make loop like this (as for non-blocking socket)?

while True:
    ssl_socket.recv(4096)
    if something:
        break


what I think is: pending() method - is fine solution for knowing needed information about ssl layer status.

SSL_pending(3) is not deprecated in OpenSSL, and I do not see reason why it should be deprecated in python. I do not think it should be deprecated only because it is not used. And it is not need to tell about asyncio, Tornado or Twisted.
History
Date User Action Args
2014-05-13 10:49:11animussetrecipients: + animus, shevek, pitrou, christian.heimes, docs@python
2014-05-13 10:49:11animussetmessageid: <1399978151.14.0.0324160818786.issue21430@psf.upfronthosting.co.za>
2014-05-13 10:49:11animuslinkissue21430 messages
2014-05-13 10:49:10animuscreate