diff --git a/media-gfx/silicon/files/rust-xcb-0.8.2-python-3.9.patch b/media-gfx/silicon/files/rust-xcb-0.8.2-python-3.9.patch new file mode 100644 index 0000000000..a7e346d8d1 --- /dev/null +++ b/media-gfx/silicon/files/rust-xcb-0.8.2-python-3.9.patch @@ -0,0 +1,43 @@ +From b41c79a73069160af5290c328acecd499f5d216a Mon Sep 17 00:00:00 2001 +From: Michel Alexandre Salim +Date: Mon, 8 Jun 2020 22:59:11 -0700 +Subject: [PATCH] Use `ElementTree` instead of `cElementTree` + +`cElementTree` has been deprecated since Python 3.3; `ElementTree` will use a fast implementation whenever available. + +`cElementTree` is actually removed as of Python 3.9 beta 1, and on Python 3.8 it's an alias to `ElementTree`. + +See https://docs.python.org/3.8/library/xml.etree.elementtree.html + +Signed-off-by: Michel Alexandre Salim +--- + xcbgen/matcher.py | 2 +- + xcbgen/state.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/xcbgen/matcher.py b/xcbgen/matcher.py +index bfa315eb..97ae5f9f 100644 +--- a/xcbgen/matcher.py ++++ b/xcbgen/matcher.py +@@ -7,7 +7,7 @@ + ''' + + from os.path import join +-from xml.etree.cElementTree import parse ++from xml.etree.ElementTree import parse + + from xcbgen.xtypes import * + +diff --git a/xcbgen/state.py b/xcbgen/state.py +index 1f5479e9..95af5a40 100644 +--- a/xcbgen/state.py ++++ b/xcbgen/state.py +@@ -2,7 +2,7 @@ + This module contains the namespace class and the singleton module class. + ''' + from os.path import dirname, basename +-from xml.etree.cElementTree import parse ++from xml.etree.ElementTree import parse + + from xcbgen import matcher + from xcbgen.error import * diff --git a/media-gfx/silicon/silicon-0.4.0.ebuild b/media-gfx/silicon/silicon-0.4.0.ebuild index e5356468bf..0f5b4d797c 100644 --- a/media-gfx/silicon/silicon-0.4.0.ebuild +++ b/media-gfx/silicon/silicon-0.4.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 2017-2020 Gentoo Authors +# Copyright 2017-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Auto-Generated by cargo-ebuild 0.3.1 @@ -188,11 +188,8 @@ LICENSE="Apache-2.0 Boost-1.0 BSD-2 CC0-1.0 MIT MPL-2.0 ZLIB" SLOT="0" KEYWORDS="~amd64 ~x86" -# Python 3.9 cannot be used for now. -# See -# (fixed but not yet released). BDEPEND=" - for python 3.9 support. + ( cd "${WORKDIR}"/cargo_home/gentoo/xcb-0.8.2 && eapply "${FILESDIR}"/rust-xcb-0.8.2-python-3.9.patch ) +} + src_install() { cargo_src_install