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.
Created on 2008年06月27日 00:11 by ndim, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| python-pydoc-p-ipv6.patch | ndim, 2008年06月27日 00:11 | IPv6 support for 'pydoc -p <port>' | review | |
| Messages (5) | |||
|---|---|---|---|
| msg68811 - (view) | Author: Hans Ulrich Niedermann (ndim) | Date: 2008年06月27日 00:11 | |
According to "pydoc --help", pydoc -p <port> Start an HTTP server on the given port on the local machine. The IP address pydoc binds to is not specified, thus I would expect it to either bind to the local address or to the wildcard address. Current behaviour of "pydoc -p 1234" is to bind to the IPv4-only address 0.0.0.0:1234. On a IPv4/IPv6 dual-stack machine, I would expect pydoc to listen to either both 127.0.0.1:1234 and [::1]:<port>, or just [::]:<port> ([::] also catches accesses to IPv4 addresses such as 127.0.0.1). Then access to the pydoc webserver is available both via IPv4 (e.g. http://127.0.0.1:1234/) and IPv6 (e.g. http://[::1]:1234/), and in both cases via http://localhost:1234/ regardless whether localhost is resolved via IPv6 or IPv4. Trivial patch attached (tested on Linux x86 machine with local IPv6 networking). |
|||
| msg68814 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2008年06月27日 05:08 | |
That will break on systems where AF_INET6 doesn't default to dual-stacked sockets and mapped v4 addresses (e.g. Windows); to make it work correctly, you'll also have to disable the IPV6_V6ONLY option, which then breaks on systems which don't implement that option (e.g. Windows XP). |
|||
| msg262883 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2016年04月05日 01:23 | |
I understand Windows XP isn’t so important these days. So maybe we just need to disable IPV6_V6ONLY. (Unless we want this for 2.7 maybe?) |
|||
| msg265517 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2016年05月14日 10:53 | |
Currently pydoc only binds to IPv4 localhost, not the "any-address" 0.0.0.0. See Issue 22421 and Issue 672656. Apart from satisfying Hans’s expectation, what is the benefit of running pydoc on IPv6? I guess it would be possible to bind two sockets, one to IPv4 localhost (127.1 or ::ffff:127.0.0.1), and the other IPv6 localhost (::1). But why bother? |
|||
| msg265676 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2016年05月16日 07:27 | |
Agreed with Martin. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:35 | admin | set | github: 47463 |
| 2016年05月16日 07:27:47 | berker.peksag | set | status: pending -> closed nosy: + berker.peksag, - Daniel Griffin messages: + msg265676 priority: normal -> low resolution: rejected stage: needs patch -> resolved |
| 2016年05月14日 12:53:55 | martin.panter | set | status: open -> pending type: crash -> enhancement versions: - Python 2.7 |
| 2016年05月14日 12:53:21 | martin.panter | set | files: - sync_node.xml |
| 2016年05月14日 12:29:42 | Daniel Griffin | set | files: + sync_node.xml |
| 2016年05月14日 12:28:56 | Daniel Griffin | set | status: pending -> open nosy: + Daniel Griffin type: enhancement -> crash versions: + Python 2.7 |
| 2016年05月14日 10:53:57 | martin.panter | set | status: open -> pending messages: + msg265517 |
| 2016年04月05日 01:23:41 | martin.panter | set | stage: needs patch messages: + msg262883 versions: + Python 3.6, - Python 3.3 |
| 2016年04月04日 23:04:12 | jleedev | set | nosy:
+ jleedev |
| 2015年02月08日 10:43:16 | martin.panter | set | nosy:
+ martin.panter |
| 2012年02月21日 04:07:15 | eric.araujo | set | type: behavior -> enhancement versions: + Python 3.3, - Python 2.6, Python 3.1, Python 2.7, Python 3.2 |
| 2010年06月09日 23:07:13 | terry.reedy | set | versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.5 |
| 2008年06月27日 05:08:26 | loewis | set | nosy:
+ loewis messages: + msg68814 |
| 2008年06月27日 00:11:28 | ndim | create | |