Skip to content

Commit

Permalink
PythonCompatCheck: add whitelist for backports
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Zamarin <[email protected]>
  • Loading branch information
arthurzam committed Jul 6, 2024
1 parent 48fbc35 commit 722236d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/pkgcheck/checks/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -621,7 +633,7 @@ def deps(self, pkg, attrs=None):
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):
Expand Down

0 comments on commit 722236d

Please sign in to comment.