summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-11-26 08:38:41 (GMT)
committerGitHub <noreply@github.com>2019-11-26 08:38:41 (GMT)
commitdadff6f6610e03a9363c52ba9c49aa923984640a (patch)
tree77cbe88317f1838a69836abfe9a0fbaa8b8e6014 /Doc
parent089387ed1f47d9443b5f28bb1863294eeac2de08 (diff)
downloadcpython-dadff6f6610e03a9363c52ba9c49aa923984640a.zip
cpython-dadff6f6610e03a9363c52ba9c49aa923984640a.tar.gz
cpython-dadff6f6610e03a9363c52ba9c49aa923984640a.tar.bz2
Remove use of deprecated `array.fromstring` method (GH-17332)
(cherry picked from commit 386d00cc341b549800776b906bfc6b20ea40c7db) Co-authored-by: David Coles <coles.david@gmail.com>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/socket.rst4
-rw-r--r--Doc/tools/susp-ignored.csv2
2 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 12b9091..ae82e43 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -1394,9 +1394,9 @@ to sockets.
fds = array.array("i") # Array of ints
msg, ancdata, flags, addr = sock.recvmsg(msglen, socket.CMSG_LEN(maxfds * fds.itemsize))
for cmsg_level, cmsg_type, cmsg_data in ancdata:
- if (cmsg_level == socket.SOL_SOCKET and cmsg_type == socket.SCM_RIGHTS):
+ if cmsg_level == socket.SOL_SOCKET and cmsg_type == socket.SCM_RIGHTS:
# Append data, ignoring any truncated integers at the end.
- fds.fromstring(cmsg_data[:len(cmsg_data) - (len(cmsg_data) % fds.itemsize)])
+ fds.frombytes(cmsg_data[:len(cmsg_data) - (len(cmsg_data) % fds.itemsize)])
return msg, list(fds)
.. availability:: most Unix platforms, possibly others.
diff --git a/Doc/tools/susp-ignored.csv b/Doc/tools/susp-ignored.csv
index 586b5db..33fbaf6 100644
--- a/Doc/tools/susp-ignored.csv
+++ b/Doc/tools/susp-ignored.csv
@@ -199,7 +199,7 @@ library/readline,,:bind,"python:bind ^I rl_complete"
library/smtplib,,:port,method must support that as well as a regular host:port
library/socket,,::,'5aef:2b::8'
library/socket,,:can,"return (can_id, can_dlc, data[:can_dlc])"
-library/socket,,:len,fds.fromstring(cmsg_data[:len(cmsg_data) - (len(cmsg_data) % fds.itemsize)])
+library/socket,,:len,fds.frombytes(cmsg_data[:len(cmsg_data) - (len(cmsg_data) % fds.itemsize)])
library/sqlite3,,:age,"cur.execute(""select * from people where name_last=:who and age=:age"", {""who"": who, ""age"": age})"
library/sqlite3,,:memory,
library/sqlite3,,:who,"cur.execute(""select * from people where name_last=:who and age=:age"", {""who"": who, ""age"": age})"