-import time, calendar, collections, binascii, base64
+import time, calendar, collections.abc, binascii, base64
statusinfo = {
400: ("Bad Request", "Invalid HTTP request."),
def enhex(bs):
return base64.b16encode(bs).decode("us-ascii")
def unhex(es):
- if not isinstance(es, collections.ByteString):
+ if not isinstance(es, collections.abc.ByteString):
try:
es = es.encode("us-ascii")
except UnicodeError:
def enb32(bs):
return base64.b32encode(bs).decode("us-ascii")
def unb32(es):
- if not isinstance(es, collections.ByteString):
+ if not isinstance(es, collections.abc.ByteString):
try:
es = es.encode("us-ascii")
except UnicodeError:
def enb64(bs):
return base64.b64encode(bs).decode("us-ascii")
def unb64(es):
- if not isinstance(es, collections.ByteString):
+ if not isinstance(es, collections.abc.ByteString):
try:
es = es.encode("us-ascii")
except UnicodeError:
-import sys, collections
+import sys, collections.abc
import xml.dom.minidom
class node(object):
new = self.nodefrom(child)
if new is not None:
node.children.append(new)
- elif isinstance(child, collections.Iterable):
+ elif isinstance(child, collections.abc.Iterable):
for ch in child:
self.addchild(node, ch)
else: