[issue39129] Incorrect import of TimeoutError while creating happy eyeballs connection

2020-01-08 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Sorry, I never got around writing a proper test for this so I am moving it to test needed if someone wants to volunteer for it. trio has some test cases for their happy eyeball implementation if it helps : https://github.com/python-trio/trio/blob/c

[issue39129] Incorrect import of TimeoutError while creating happy eyeballs connection

2019-12-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: The main problem of mock-based tests in asyncio is that the tests become unreliably very easy after mocked asyncio internal changes. I'm +0 on adding the proposed test. The better idea is serving on explicit AF_INET '127.0.0.1:' address when the connection i

[issue39129] Incorrect import of TimeoutError while creating happy eyeballs connection

2019-12-24 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Is there a way this can be tested? I tried simulating OSError for IPv4 address and returning socket for ipv6 one like it resolves correctly. I guess that's the underlying idea of happy eyeballs but a test can be added for basic workflow since it la

[issue39129] Incorrect import of TimeoutError while creating happy eyeballs connection

2019-12-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +17147 pull_request: https://github.com/python/cpython/pull/17693 ___ Python tracker ___ __

[issue39129] Incorrect import of TimeoutError while creating happy eyeballs connection

2019-12-24 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +17146 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17691 ___ Python tracker ___ _

[issue39129] Incorrect import of TimeoutError while creating happy eyeballs connection

2019-12-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: You are right. Hmm, I thought that Happy Eyeballs is better tested. -- ___ Python tracker ___ __

[issue39129] Incorrect import of TimeoutError while creating happy eyeballs connection

2019-12-23 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : I guess the TimeoutError exception needs to be imported from asyncio.exceptions and not from asyncio.futures that causes AttributeError while instantiating a connection with happy eyeballs. ./python.exe -m asyncio asyncio REPL 3.9.0a2+ (heads/mas