Dave Tian added the comment:

Hi David,

Thanks for your quick response. I have tried Python 3.4.2 using 
urllib.request.urlopen() - still not working. Below is the backtrace. I am not 
sure if this is a bug of PySSL_SSLread, which returns nothing yet without 
timeout. If you want me to dig into this deeper, just let me know.

Thanks,

Dave Tian
dave.jing.t...@gmail.com

>>> obj=urllib.request.urlopen(url, timeout=20)
^CTraceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/daveti/Python-3.4.2/Lib/urllib/request.py", line 153, in urlopen
    return opener.open(url, data, timeout)
  File "/Users/daveti/Python-3.4.2/Lib/urllib/request.py", line 461, in open
    response = meth(req, response)
  File "/Users/daveti/Python-3.4.2/Lib/urllib/request.py", line 571, in 
http_response
    'http', request, response, code, msg, hdrs)
  File "/Users/daveti/Python-3.4.2/Lib/urllib/request.py", line 493, in error
    result = self._call_chain(*args)
  File "/Users/daveti/Python-3.4.2/Lib/urllib/request.py", line 433, in 
_call_chain
    result = func(*args)
  File "/Users/daveti/Python-3.4.2/Lib/urllib/request.py", line 676, in 
http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/Users/daveti/Python-3.4.2/Lib/urllib/request.py", line 455, in open
    response = self._open(req, data)
  File "/Users/daveti/Python-3.4.2/Lib/urllib/request.py", line 473, in _open
    '_open', req)
  File "/Users/daveti/Python-3.4.2/Lib/urllib/request.py", line 433, in 
_call_chain
    result = func(*args)
  File "/Users/daveti/Python-3.4.2/Lib/urllib/request.py", line 1217, in 
https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/Users/daveti/Python-3.4.2/Lib/urllib/request.py", line 1177, in do_open
    r = h.getresponse()
  File "/Users/daveti/Python-3.4.2/Lib/http/client.py", line 1172, in 
getresponse
    response.begin()
  File "/Users/daveti/Python-3.4.2/Lib/http/client.py", line 375, in begin
    self.headers = self.msg = parse_headers(self.fp)
  File "/Users/daveti/Python-3.4.2/Lib/http/client.py", line 261, in 
parse_headers
    line = fp.readline(_MAXLINE + 1)
  File "/Users/daveti/Python-3.4.2/Lib/socket.py", line 371, in readinto
    return self._sock.recv_into(b)
  File "/Users/daveti/Python-3.4.2/Lib/ssl.py", line 746, in recv_into
    return self.read(nbytes, buffer)
  File "/Users/daveti/Python-3.4.2/Lib/ssl.py", line 618, in read
    v = self._sslobj.read(len, buffer)
KeyboardInterrupt
>>> 

> On Nov 15, 2014, at 3:36 AM, R. David Murray <rep...@bugs.python.org> wrote:
> 
> 
> R. David Murray added the comment:
> 
> It sounds like the bug is that PySSL_SSLread didn't raise the timeout?  Any 
> idea if this is still a problem in python3?  (Could possibly have changed on 
> trunk as well, as SSL is being updated in 2.7.9.)
> 
> ----------
> nosy: +r.david.murray
> 
> _______________________________________
> Python tracker <rep...@bugs.python.org>
> <http://bugs.python.org/issue22870>
> _______________________________________

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22870>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to