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.

classification
Title: Change socket.getaddrinfo example to show IPv6 connectivity
Type: Stage: resolved
Components: Documentation Versions: Python 3.6, Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Paul Marks, docs@python, ned.deily, python-dev
Priority: normal Keywords: easy

Created on 2015-06-02 00:59 by Paul Marks, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (7)
msg244625 - (view) Author: Paul Marks (Paul Marks) Date: 2015-06-02 00:59
Python's web servers were formerly reachable from IPv6 clients, as evidenced by this example code for socket.getaddrinfo():

https://docs.python.org/3/library/socket.html#socket.getaddrinfo

But today, www.python.org is IPv4-only:

>>> import socket
>>> socket.getaddrinfo("www.python.org", 80, proto=socket.IPPROTO_TCP)
[(<AddressFamily.AF_INET: 2>, <SocketType.SOCK_STREAM: 1>, 6, '', ('23.235.40.223', 80))]

Please either restore IPv6 connectivity to www.python.org, or accept the shame and defeat of pointing the documentation to someone else's domain.
msg244630 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2015-06-02 01:16
Thanks for the report. According to the PSF Infrastructure Team, www.python.org currently does not support IPv6 because the Content Delivery Network that we now use does not support it yet.  One Python URL that does support IPv6:

>>> socket.getaddrinfo("hg.python.org", 80, proto=socket.IPPROTO_TCP)
[(<AddressFamily.AF_INET6: 10>, <SocketType.SOCK_STREAM: 1>, 6, '', ('2001:4802:7901:0:e60a:1375:0:4', 80, 0, 0)), (<AddressFamily.AF_INET: 2>, <SocketType.SOCK_STREAM: 1>, 6, '', ('104.130.43.97', 80))]
msg244633 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-06-02 01:58
New changeset b461d900fdb5 by Ned Deily in branch '3.4':
Issue #24357: Change host in socket.getaddrinfo example to one that
https://hg.python.org/cpython/rev/b461d900fdb5

New changeset 22b77f859521 by Ned Deily in branch '3.5':
Issue #24357: merge from 3.4
https://hg.python.org/cpython/rev/22b77f859521

New changeset 7c7b1fffafdf by Ned Deily in branch 'default':
Issue #24357: merge from 3.5
https://hg.python.org/cpython/rev/7c7b1fffafdf

New changeset 30da21d2fa4f by Ned Deily in branch '2.7':
Issue #24357: Change host in socket.getaddrinfo example to one that
https://hg.python.org/cpython/rev/30da21d2fa4f
msg244638 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-06-02 02:24
New changeset acf4dbd99d11 by Ned Deily in branch '3.4':
Issue #24357: fix typo
https://hg.python.org/cpython/rev/acf4dbd99d11

New changeset fcb415e5b40b by Ned Deily in branch '3.5':
Issue #24357: merge from 3.4
https://hg.python.org/cpython/rev/fcb415e5b40b

New changeset 74ff057c2c83 by Ned Deily in branch 'default':
Issue #24357: merge from 3.5
https://hg.python.org/cpython/rev/74ff057c2c83
msg244641 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-06-02 02:39
New changeset fb12d742b70c by Ned Deily in branch '3.4':
Issue #24357: fix real typo
https://hg.python.org/cpython/rev/fb12d742b70c

New changeset 5bfa78bf0607 by Ned Deily in branch '3.5':
Issue #24357: merge from 3.4
https://hg.python.org/cpython/rev/5bfa78bf0607

New changeset 421847aa0b22 by Ned Deily in branch 'default':
Issue #24357: merge from 3.5
https://hg.python.org/cpython/rev/421847aa0b22
msg244643 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2015-06-02 02:45
We decided to use google.com as an example instead.  (And I tested the tracker upgrade by fixing the wrong initial typo that I had made.)
msg244646 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-06-02 04:22
New changeset 5ae3418fe63e by Ned Deily in branch '2.7':
Issue #24357: use example.org instead
https://hg.python.org/cpython/rev/5ae3418fe63e

New changeset dbf3aa36bea7 by Ned Deily in branch '3.4':
Issue #24357: use example.org instead
https://hg.python.org/cpython/rev/dbf3aa36bea7

New changeset d751900d0406 by Ned Deily in branch '3.5':
Issue #24357: merge from 3.4
https://hg.python.org/cpython/rev/d751900d0406

New changeset e09cefe1e5b8 by Ned Deily in branch 'default':
Issue #24357: merge from 3.5
https://hg.python.org/cpython/rev/e09cefe1e5b8
History
Date User Action Args
2022-04-11 14:58:17adminsetgithub: 68545
2015-06-02 04:22:16python-devsetmessages: + msg244646
2015-06-02 02:45:04ned.deilysetstatus: open -> closed
resolution: fixed
messages: + msg244643

stage: needs patch -> resolved
2015-06-02 02:39:15python-devsetmessages: + msg244641
2015-06-02 02:24:55python-devsetmessages: + msg244638
2015-06-02 01:58:02python-devsetnosy: + python-dev
messages: + msg244633
2015-06-02 01:16:45ned.deilysettitle: www.python.org lost IPv6 connectivity -> Change socket.getaddrinfo example to show IPv6 connectivity

keywords: + easy
nosy: + ned.deily
versions: + Python 2.7, Python 3.4, Python 3.5, Python 3.6
messages: + msg244630
stage: needs patch
2015-06-02 00:59:40Paul Markscreate