summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-06-05 19:57:49 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2020-06-06 00:42:07 +0200
commit873161d2dcd610fc67a58d583fad3be3f2700bed (patch)
tree56bcbfe53ff4dab78989040285e1b190d6683fcf
parentdev-python/tappy: 2.6.2 version bump w/ python3_9 (diff)
downloadgentoo-873161d2dcd610fc67a58d583fad3be3f2700bed.tar.gz
gentoo-873161d2dcd610fc67a58d583fad3be3f2700bed.tar.bz2
gentoo-873161d2dcd610fc67a58d583fad3be3f2700bed.zip
dev-python/dbus-python: python3_9
Tests passed. Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--dev-python/dbus-python/dbus-python-1.2.16.ebuild4
-rw-r--r--dev-python/dbus-python/files/dbus-python-1.2.16-py39.patch33
2 files changed, 36 insertions, 1 deletions
diff --git a/dev-python/dbus-python/dbus-python-1.2.16.ebuild b/dev-python/dbus-python/dbus-python-1.2.16.ebuild
index d7512b4dc8f8..e07d2500f718 100644
--- a/dev-python/dbus-python/dbus-python-1.2.16.ebuild
+++ b/dev-python/dbus-python/dbus-python-1.2.16.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python2_7 python3_{6,7,8} )
+PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} )
PYTHON_REQ_USE="threads(+)"
inherit autotools python-r1
@@ -33,6 +33,8 @@ BDEPEND="
dev-python/tappy[${PYTHON_USEDEP}] )
"
+PATCHES=( "${FILESDIR}/${P}-py39.patch" )
+
python_check_deps() {
has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
}
diff --git a/dev-python/dbus-python/files/dbus-python-1.2.16-py39.patch b/dev-python/dbus-python/files/dbus-python-1.2.16-py39.patch
new file mode 100644
index 000000000000..93db26cfcefc
--- /dev/null
+++ b/dev-python/dbus-python/files/dbus-python-1.2.16-py39.patch
@@ -0,0 +1,33 @@
+From 6a899a9174c8008ba5fb576238ea4d7c970453c3 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@collabora.com>
+Date: Tue, 14 Jan 2020 15:29:43 +0000
+Subject: [PATCH] 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>
+---
+ dbus/service.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+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 (
+--
+2.26.2
+