02-support-python-3.10.patch 795 B

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