From 31086766079bdb7b90f27384b8831b332d9018f3 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Tue, 14 Jul 2020 15:00:24 +0200 Subject: [PATCH] Import MutableMapping from collections.abc instead of collections Importing MutableMapping from collections is deprecated since Python 3.3 and will stop working in 3.9. See the following deprecation notice: libtmux/common.py:233: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working Hence we now import from collections.abc. --- libtmux/common.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libtmux/common.py b/libtmux/common.py index 46ce6ce18..0eaa314cc 100644 --- a/libtmux/common.py +++ b/libtmux/common.py @@ -6,7 +6,7 @@ ~~~~~~~~~~~~~~ """ -import collections +import collections.abc import logging import os import re @@ -231,9 +231,9 @@ def __init__(self, *args, **kwargs): logger.debug('self.stdout for %s: \n%s' % (' '.join(cmd), self.stdout)) -class TmuxMappingObject(collections.MutableMapping): +class TmuxMappingObject(collections.abc.MutableMapping): - """Base: :py:class:`collections.MutableMapping`. + """Base: :py:class:`collections.abc.MutableMapping`. Convenience container. Base class for :class:`Pane`, :class:`Window`, :class:`Session` and :class:`Server`.