diff options
author | 2021-10-22 17:56:40 +0300 | |
---|---|---|
committer | 2021-10-22 18:15:56 +0300 | |
commit | fdbb4f160a23f80104844c3db6c4d220931d9b5d (patch) | |
tree | a9fc7da68c39ea7b3b6381fa9981154340af8f89 /dev-python/cssutils/files | |
parent | games-rpg/silence: Drop unneeded libsdl2 dependency (diff) | |
download | gentoo-fdbb4f160a23f80104844c3db6c4d220931d9b5d.tar.gz gentoo-fdbb4f160a23f80104844c3db6c4d220931d9b5d.tar.bz2 gentoo-fdbb4f160a23f80104844c3db6c4d220931d9b5d.zip |
dev-python/cssutils: add 2.3.0, enable py3.10
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-python/cssutils/files')
-rw-r--r-- | dev-python/cssutils/files/cssutils-2.3.0-fix-py3.10.patch | 21 | ||||
-rw-r--r-- | dev-python/cssutils/files/cssutils-2.3.0-fix-py3.8.patch | 30 |
2 files changed, 51 insertions, 0 deletions
diff --git a/dev-python/cssutils/files/cssutils-2.3.0-fix-py3.10.patch b/dev-python/cssutils/files/cssutils-2.3.0-fix-py3.10.patch new file mode 100644 index 000000000000..540fc7a1cc03 --- /dev/null +++ b/dev-python/cssutils/files/cssutils-2.3.0-fix-py3.10.patch @@ -0,0 +1,21 @@ +From: Arthur Zamarin <arthurzam@gmail.com> +Date: Fri, 22 Oct 2021 17:48:28 +0300 +Subject: [PATCH] Fix expected error message for python 3.10 + +python 3.10 adds some words to it's errors, so catch if our expected +are contained in the actual output + +Signed-off-by: Arthur Zamarin <arthurzam@gmail.com> +https://github.com/jaraco/cssutils/pull/17 + +--- a/cssutils/tests/basetest.py ++++ b/cssutils/tests/basetest.py +@@ -126,7 +126,7 @@ class BaseTestCase(unittest.TestCase): + if not msg: + # No message provided: any message is fine. + return +- elif excMsg == msg: ++ elif msg in excMsg: + # Message provided, and we got the right message: passes. + return + else: 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 |