Skip to content

Commit 722236d

Browse files
committed
PythonCompatCheck: add whitelist for backports
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
1 parent 48fbc35 commit 722236d

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/pkgcheck/checks/python.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,18 @@ class PythonCompatCheck(Check):
579579

580580
known_results = frozenset([PythonCompatUpdate])
581581

582+
whitelist_backports = frozenset(
583+
{
584+
"dev-python/backports-tarfile",
585+
"dev-python/exceptiongroup",
586+
"dev-python/importlib-metadata",
587+
"dev-python/taskgroup",
588+
"dev-python/typing-extensions",
589+
"dev-python/unittest-or-fail",
590+
"dev-python/zipp",
591+
}
592+
)
593+
582594
def __init__(self, *args):
583595
super().__init__(*args)
584596
repo = self.options.target_repo
@@ -621,7 +633,7 @@ def deps(self, pkg, attrs=None):
621633
p
622634
for attr in (x.lower() for x in attrs)
623635
for p in iflatten_instance(getattr(pkg, attr), atom)
624-
if not p.blocks
636+
if not p.blocks and p.key not in self.whitelist_backports
625637
}
626638

627639
def feed(self, pkg):

0 commit comments

Comments
 (0)