You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
815 B

  1. From 2b6bb2c1bed8f7009631e8f8c306fa3160324a49 Mon Sep 17 00:00:00 2001
  2. From: "Sergey G. Brester" <serg.brester@sebres.de>
  3. Date: Mon, 8 Feb 2021 17:19:24 +0100
  4. Subject: [PATCH] follow bpo-37324: :ref:`collections-abstract-base-classes`
  5. moved to the :mod:`collections.abc` module
  6. (since 3.10-alpha.5 `MutableMapping` is missing in collections module)
  7. ---
  8. fail2ban/server/action.py | 5 ++++-
  9. 1 file changed, 4 insertions(+), 1 deletion(-)
  10. --- a/fail2ban/server/action.py
  11. +++ b/fail2ban/server/action.py
  12. @@ -30,7 +30,10 @@ import tempfile
  13. import threading
  14. import time
  15. from abc import ABCMeta
  16. -from collections import MutableMapping
  17. +try:
  18. + from collections.abc import MutableMapping
  19. +except ImportError:
  20. + from collections import MutableMapping
  21. from .failregex import mapTag2Opt
  22. from .ipdns import DNSUtils