[issue42620] documentation on `getsockname()` wrong for AF_INET6

2020-12-22 Thread miss-islington


miss-islington  added the comment:


New changeset 7fe7d83c26b02c8a65c8a9633cc4251f5cd97ebf by Miss Islington (bot) 
in branch '3.9':
bpo-42620: Improve socket.getsockname doc string (GH-23742)
https://github.com/python/cpython/commit/7fe7d83c26b02c8a65c8a9633cc4251f5cd97ebf


--

___
Python tracker 

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



[issue42620] documentation on `getsockname()` wrong for AF_INET6

2020-12-22 Thread miss-islington


miss-islington  added the comment:


New changeset b20494618c6ac6ebcd354e0b16a6645fe47acbee by Miss Islington (bot) 
in branch '3.8':
bpo-42620: Improve socket.getsockname doc string (GH-23742)
https://github.com/python/cpython/commit/b20494618c6ac6ebcd354e0b16a6645fe47acbee


--

___
Python tracker 

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



[issue42620] documentation on `getsockname()` wrong for AF_INET6

2020-12-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +22760
pull_request: https://github.com/python/cpython/pull/23907

___
Python tracker 

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



[issue42620] documentation on `getsockname()` wrong for AF_INET6

2020-12-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +22759
pull_request: https://github.com/python/cpython/pull/23906

___
Python tracker 

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



[issue42620] documentation on `getsockname()` wrong for AF_INET6

2020-12-22 Thread miss-islington


miss-islington  added the comment:


New changeset cf3565ca9a7ed0f7decd000e41fa3de400986e4d by Christian Heimes in 
branch 'master':
bpo-42620: Improve socket.getsockname doc string (GH-23742)
https://github.com/python/cpython/commit/cf3565ca9a7ed0f7decd000e41fa3de400986e4d


--
nosy: +miss-islington

___
Python tracker 

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



[issue42620] documentation on `getsockname()` wrong for AF_INET6

2020-12-11 Thread Rick van Rein


Rick van Rein  added the comment:

Excellent, thanks.  I personally would appreciate if a remark about IPv6 would 
also be made.

--

___
Python tracker 

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



[issue42620] documentation on `getsockname()` wrong for AF_INET6

2020-12-11 Thread Christian Heimes


Christian Heimes  added the comment:

Good point. The address info depends on the address family, 
https://docs.python.org/3/library/socket.html#socket-families . I have updated 
the doc string:

>>> import socket
>>> print(socket.socket.getsockname.__doc__)
getsockname() -> address info

Return the address of the local endpoint. The format depends on the
address family. For IPv4 sockets, the address info is a pair
(hostaddr, port).

--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7

___
Python tracker 

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



[issue42620] documentation on `getsockname()` wrong for AF_INET6

2020-12-11 Thread Christian Heimes


Change by Christian Heimes :


--
keywords: +patch
nosy: +christian.heimes
nosy_count: 1.0 -> 2.0
pull_requests: +22600
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23742

___
Python tracker 

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



[issue42620] documentation on `getsockname()` wrong for AF_INET6

2020-12-11 Thread Rick van Rein


New submission from Rick van Rein :

Shown in the session below is unexpected output of a 4-tuple from an AF_INET6 
socket along with documentation that *suggests* to expect a 2-tuple.  The 
phrasing "IP" might have to be toned down to "IPv4" or "AF_INET" to be accurate 
enough to avoid confusion.

Opinion: I think you should be explicit about the different behaviour for 
AF_INET6, so it is not reduced to a special/nut case for special interest 
groups.  IPv6 has a hard enough time getting in; different formats for AF_INET 
and AF_INET6 should ideally be shown to all programmers, to at least avoid 
*uninformed* decisions to be incompatible with IPv6 while they develop on an 
IPv4 system (and the same in the opposite direction).


Python 3.7.3 (default, Jul 25 2020, 13:03:44) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> sox6 = socket.socket (socket.AF_INET6)
>>> sox6.getsockname ()
('::', 0, 0, 0)
>>> sox6.getsockname.__doc__
'getsockname() -> address info\n\nReturn the address of the local endpoint.  
For IP sockets, the address\ninfo is a pair (hostaddr, port).'

--
components: Library (Lib)
messages: 382863
nosy: vanrein
priority: normal
severity: normal
status: open
title: documentation on `getsockname()` wrong for AF_INET6
type: behavior
versions: Python 3.7

___
Python tracker 

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