question on string object handling in Python 2.7.8

2014-12-24 Thread Dave Tian
Hi, There are 2 statements: A: a = ‘h’ B: b = ‘hh’ According to me understanding, A should be faster as characters would shortcut this 1-byte string ‘h’ without malloc; B should be slower than A as characters does not work for 2-byte string ‘hh’, which triggers the malloc. However, when I put

[issue22870] urlopen timeout failed with SSL socket

2014-11-17 Thread Dave Tian
Dave Tian added the comment: Alright. The issued URL of my case is here: www.5giay.vn Nor am I a ssl dev...Here is what happens after further debugging: PySSL_SSLread() returns 1/2 bytes without any error/timeout per call. readline() in socket.py keeps looping. Occasionally, it may break out

[issue22870] urlopen timeout failed with SSL socket

2014-11-15 Thread Dave Tian
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

[issue22870] urlopen timeout failed with SSL socket

2014-11-14 Thread Dave Tian
New submission from Dave Tian: Hi there, Recent urlopen with timeout did not work. Below is the back trace. After digging into the Python lib, the root cause is found - within the socket.py, self._sock.recv(), under a 'while True' loop, tried to retrieve sth from the under-layer SSL socket