[issue27500] ProactorEventLoop cannot open connection to ::1

2019-01-15 Thread Sebastien Bourdeauducq


Sebastien Bourdeauducq  added the comment:

Thank you!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2019-01-15 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-06-28 Thread miss-islington


miss-islington  added the comment:


New changeset c00144cd7741a5060662e85717f6559ad46d02aa by Miss Islington (bot) 
in branch '3.6':
bpo-27500: Fix static version of getaddrinfo to resolve IPv6 (GH-7993)
https://github.com/python/cpython/commit/c00144cd7741a5060662e85717f6559ad46d02aa


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-06-28 Thread miss-islington


miss-islington  added the comment:


New changeset 3ed44141216aa1d2d8dd7d170c2dc216a6e718b6 by Miss Islington (bot) 
in branch '3.7':
bpo-27500: Fix static version of getaddrinfo to resolve IPv6 (GH-7993)
https://github.com/python/cpython/commit/3ed44141216aa1d2d8dd7d170c2dc216a6e718b6


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-06-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7608

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-06-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7607

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-06-28 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset d904c238ca3551750cb97d15d827c3e525970867 by Yury Selivanov in 
branch 'master':
bpo-27500: Fix static version of getaddrinfo to resolve IPv6 (GH-7993)
https://github.com/python/cpython/commit/d904c238ca3551750cb97d15d827c3e525970867


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-06-28 Thread Yury Selivanov


Yury Selivanov  added the comment:

> Somebody please submit a PR so this can be fixed in 3.7.1 and the fix can
> be backported to 3.6.7.

Somehow I overlooked this one when I was sifting the issues we needed to fix in 
3.7.  I've opened a PR.

--
priority: normal -> high

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-06-28 Thread Yury Selivanov


Change by Yury Selivanov :


--
keywords: +patch
pull_requests: +7604
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-06-28 Thread Guido van Rossum


Guido van Rossum  added the comment:

Somebody please submit a PR so this can be fixed in 3.7.1 and the fix can
be backported to 3.6.7.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-06-28 Thread bay


bay  added the comment:

The bug is reproducible on Python 3.7. The connect call always fails when I
try to use connect to any IPv6 address with ProactorEventLoop.

The bug can be bypassed by adding "%0" to the IPv6 address. This will cause
to trigger this if construction:
https://github.com/python/cpython/blob/e76ac9d4ef77b74ea7de768f4de7c38893fad539/Lib/asyncio/base_events.py#L133

As mentioned by Sebastian, it happen because the _ipaddr_info function returns
only the host and the port for IPv6: return af, type, proto, '', (host, port)
https://github.com/python/cpython/blob/e76ac9d4ef77b74ea7de768f4de7c38893fad539/Lib/asyncio/base_events.py#L142

This (host, port) tuple used in ConnectEx call, but it expect 4-element tuple
to connect IPv6: 
https://github.com/python/cpython/blob/55edd0c185ad2d895b5d73e47d67049bc156b654/Modules/overlapped.c#L1090
Instead it tries to connect, using IPv4 and fails.

The bug can be fixed by doing the following:
if af == socket.AF_INET6:
return af, type, proto, '', (host, port, 0, 0)
else:
return af, type, proto, '', (host, port)

instead of
return af, type, proto, '', (host, port) 

in
https://github.com/python/cpython/blob/e76ac9d4ef77b74ea7de768f4de7c38893fad539/Lib/asyncio/base_events.py#L142

--
nosy: +bay

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2018-05-29 Thread Sebastien Bourdeauducq


Sebastien Bourdeauducq  added the comment:

Any chance someone could look into this bug?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2017-02-28 Thread Sebastien Bourdeauducq

Sebastien Bourdeauducq added the comment:

This is still a problem with Python 3.5.3 and 3.6.0.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2017-01-25 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
nosy: +gregory.p.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2016-07-12 Thread Sebastien Bourdeauducq

Sebastien Bourdeauducq added the comment:

The first offending commit is this one:
https://github.com/python/cpython/commit/03df54d549173e17e1cf9a767199de32a363aa6b

more specifically "return af, type, proto, '', (host, port)". For IPv6, it 
should be "(host, port, flow info, scope id)" instead of just "(host, port)".

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27500] ProactorEventLoop cannot open connection to ::1

2016-07-12 Thread Sebastien Bourdeauducq

New submission from Sebastien Bourdeauducq:

The following code fails with "OSError: [WinError 10022] An invalid argument 
was supplied".

import asyncio
loop = asyncio.ProactorEventLoop()
asyncio.set_event_loop(loop)
loop.run_until_complete(asyncio.open_connection("::1", 4242))

This is a regression in 3.5.2. 3.5.1 does not have this bug. Connecting to 
127.0.0.1 does not cause the problem.

--
components: asyncio
messages: 270258
nosy: gvanrossum, haypo, sebastien.bourdeauducq, yselivanov
priority: normal
severity: normal
status: open
title: ProactorEventLoop cannot open connection to ::1
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com