diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-02 12:34:40 +0300 |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-02 12:34:40 +0300 |
| commit | 6a7d3480fc8fe4c60538547d2935083ccff0f631 (patch) | |
| tree | 9a6a13be60de50579071c31c48079b980aee0bd1 /Doc/library | |
| parent | a5749197aaecefef522c13544471a9cb571ab5b6 (diff) | |
| download | cpython-git-6a7d3480fc8fe4c60538547d2935083ccff0f631.tar.gz | |
Issue #28332: Deprecated silent truncations in socket.htons and socket.ntohs.
Original patch by Oren Milman.
Diffstat (limited to 'Doc/library')
| -rw-r--r-- | Doc/library/socket.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 6909a64c37..d33bbc3286 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -664,6 +664,12 @@ The :mod:`socket` module also offers various network-related services: where the host byte order is the same as network byte order, this is a no-op; otherwise, it performs a 2-byte swap operation. + .. deprecated:: 3.7 + In case *x* does not fit in 16-bit unsigned integer, but does fit in a + positive C int, it is silently truncated to 16-bit unsigned integer. + This silent truncation feature is deprecated, and will raise an + exception in future versions of Python. + .. function:: htonl(x) @@ -678,6 +684,12 @@ The :mod:`socket` module also offers various network-related services: where the host byte order is the same as network byte order, this is a no-op; otherwise, it performs a 2-byte swap operation. + .. deprecated:: 3.7 + In case *x* does not fit in 16-bit unsigned integer, but does fit in a + positive C int, it is silently truncated to 16-bit unsigned integer. + This silent truncation feature is deprecated, and will raise an + exception in future versions of Python. + .. function:: inet_aton(ip_string) |
