commit: 722236d305e4fc745e9ba28e377d167e2914f3f7
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 6 16:23:36 2024 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Jul 6 16:25:17 2024 +0000
URL:
https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=722236d3
PythonCompatCheck: add whitelist for backports
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
src/pkgcheck/checks/python.py | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/pkgcheck/checks/python.py b/src/pkgcheck/checks/python.py
index 229bb3e9..13ec6311 100644
--- a/src/pkgcheck/checks/python.py
+++ b/src/pkgcheck/checks/python.py
@@ -579,6 +579,18 @@ class PythonCompatCheck(Check):
known_results = frozenset([PythonCompatUpdate])
+ whitelist_backports = frozenset(
+ {
+ "dev-python/backports-tarfile",
+ "dev-python/exceptiongroup",
+ "dev-python/importlib-metadata",
+ "dev-python/taskgroup",
+ "dev-python/typing-extensions",
+ "dev-python/unittest-or-fail",
+ "dev-python/zipp",
+ }
+ )
+
def __init__(self, *args):
super().__init__(*args)
repo = self.options.target_repo
@@ -621,7 +633,7 @@ class PythonCompatCheck(Check):
p
for attr in (x.lower() for x in attrs)
for p in iflatten_instance(getattr(pkg, attr), atom)
- if not p.blocks
+ if not p.blocks and p.key not in self.whitelist_backports
}
def feed(self, pkg):