mirror of
https://github.com/python/cpython.git
synced 2025-10-08 08:01:55 +00:00
bpo-30144: Import collections ABC from collections.abc rather than collections. (#1263)
This commit is contained in:
parent
9eb5ca0774
commit
2e576f5aec
22 changed files with 90 additions and 85 deletions
|
@ -74,7 +74,7 @@ import http
|
|||
import io
|
||||
import re
|
||||
import socket
|
||||
import collections
|
||||
import collections.abc
|
||||
from urllib.parse import urlsplit
|
||||
|
||||
# HTTPMessage, parse_headers(), and the HTTP status code constants are
|
||||
|
@ -977,7 +977,7 @@ class HTTPConnection:
|
|||
try:
|
||||
self.sock.sendall(data)
|
||||
except TypeError:
|
||||
if isinstance(data, collections.Iterable):
|
||||
if isinstance(data, collections.abc.Iterable):
|
||||
for d in data:
|
||||
self.sock.sendall(d)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue