summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorDavid Coles <coles.david@gmail.com>2019-11-26 06:31:09 (GMT)
committerInada Naoki <songofacandy@gmail.com>2019-11-26 06:31:09 (GMT)
commit386d00cc341b549800776b906bfc6b20ea40c7db (patch)
treea6a3a16224bc58dbbe02c92926bbcdbc8bbe72ce /Doc
parent6dd9b64770af8905bef293c81d541eaaf8d8df52 (diff)
downloadcpython-386d00cc341b549800776b906bfc6b20ea40c7db.zip
cpython-386d00cc341b549800776b906bfc6b20ea40c7db.tar.gz
cpython-386d00cc341b549800776b906bfc6b20ea40c7db.tar.bz2
Remove use of deprecated `array.fromstring` method (GH-17332)
Diffstat (limited to 'Doc')
-rwxr-xr-xDoc/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 62552bc..2d7ca33 100755
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -1411,9 +1411,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 7615f24..5cdfd40 100644
--- a/Doc/tools/susp-ignored.csv
+++ b/Doc/tools/susp-ignored.csv
@@ -201,7 +201,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})"