bpo-30144: Import collections ABC from collections.abc rather than collections. (#1263)

This commit is contained in:
Serhiy Storchaka 2017-04-24 09:05:00 +03:00 committed by GitHub
parent 9eb5ca0774
commit 2e576f5aec
22 changed files with 90 additions and 85 deletions

View file

@ -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: