diff options
author | Simon McVittie <smcv@collabora.com> | 2020-01-14 15:29:43 +0000 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2020-01-14 15:29:43 +0000 |
commit | 6a899a9174c8008ba5fb576238ea4d7c970453c3 (patch) | |
tree | a3a9d59528886e23e654321f5e0b53c63b217755 | |
parent | 97ad684ae54508178b6cd9fa659062e8e71978dd (diff) | |
download | dbus-python-6a899a9174c8008ba5fb576238ea4d7c970453c3.tar.gz |
service: Adjust to deprecation of collections.Sequence
Since Python 3.3 the recommended location is collections.abc.Sequence,
and the collections.Sequence alias will be removed in 3.9.
Signed-off-by: Simon McVittie <smcv@collabora.com>
-rw-r--r-- | dbus/service.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dbus/service.py b/dbus/service.py index fd57054..0c8695a 100644 --- a/dbus/service.py +++ b/dbus/service.py @@ -32,7 +32,11 @@ import sys import logging import threading import traceback -from collections import Sequence +try: + from collections.abc import Sequence +except ImportError: + # Python 2 (and 3.x < 3.3, but we don't support those) + from collections import Sequence import _dbus_bindings from dbus import ( |