summaryrefslogtreecommitdiff
path: root/dev-python/cssutils/files/cssutils-2.3.0-fix-py3.8.patch
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2021-10-23 11:07:59 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2021-10-23 11:07:59 +0000
commited3ae48fecb01970705fb8e99910f72d8da6e2fe (patch)
tree6e43eadbd13e8c8a209496c73ed68aab92751ca9 /dev-python/cssutils/files/cssutils-2.3.0-fix-py3.8.patch
parent7b3f6da73383a258bdaec6bb0e309e1b19b52ead (diff)
downloadbaldeagleos-repo-ed3ae48fecb01970705fb8e99910f72d8da6e2fe.tar.gz
baldeagleos-repo-ed3ae48fecb01970705fb8e99910f72d8da6e2fe.tar.xz
baldeagleos-repo-ed3ae48fecb01970705fb8e99910f72d8da6e2fe.zip
Adding metadata
Diffstat (limited to 'dev-python/cssutils/files/cssutils-2.3.0-fix-py3.8.patch')
-rw-r--r--dev-python/cssutils/files/cssutils-2.3.0-fix-py3.8.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/dev-python/cssutils/files/cssutils-2.3.0-fix-py3.8.patch b/dev-python/cssutils/files/cssutils-2.3.0-fix-py3.8.patch
new file mode 100644
index 000000000000..a3fff246b616
--- /dev/null
+++ b/dev-python/cssutils/files/cssutils-2.3.0-fix-py3.8.patch
@@ -0,0 +1,30 @@
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Mon, 24 May 2021 08:35:13 +0200
+Subject: [PATCH] Force using importlib_resources in Python < 3.9
+
+Force using the external importlib_resources package based on Python
+version rather than the presence of the built-in importlib.resources.
+The latter does not have the needed files() method in Python < 3.9,
+and therefore results in test failures:
+
+ E AttributeError: module 'importlib.resources' has no attribute 'files'
+
+This affects specifically Python 3.7 and 3.8 that have an older version
+of importlib.resources module.
+
+https://github.com/jaraco/cssutils/pull/10
+
+--- a/cssutils/tests/basetest.py
++++ b/cssutils/tests/basetest.py
+@@ -6,9 +6,9 @@
+ import sys
+ import unittest
+
+-try:
++if sys.version_info >= (3, 9):
+ from importlib import resources
+-except ImportError:
++else:
+ import importlib_resources as resources
+
+ import cssutils