aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/tornado/tornado-4/patches/02-support-python-3.10.patch
blob: d95d168093c03a64c20a39fa52130a358de110b0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- contrib/python/tornado/tornado-4/tornado/httputil.py	(index)
+++ contrib/python/tornado/tornado-4/tornado/httputil.py	(working tree)
@@ -31,6 +31,11 @@ import numbers
 import re
 import time
 
+try:
+    from collections.abc import MutableMapping
+except ImportError:
+    from collections import MutableMapping
+
 from tornado.escape import native_str, parse_qs_bytes, utf8
 from tornado.log import gen_log
 from tornado.util import ObjectDict, PY3
@@ -103,7 +108,7 @@ class _NormalizedHeaderCache(dict):
 _normalized_headers = _NormalizedHeaderCache(1000)
 
 
-class HTTPHeaders(collections.MutableMapping):
+class HTTPHeaders(MutableMapping):
     """A dictionary that maintains ``Http-Header-Case`` for all keys.
 
     Supports multiple values per key via a pair of new methods,
 END()