Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/urllib3-1.26.18
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-cal authored Oct 18, 2023
2 parents 8fec87a + feb701d commit 687262e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions snapcraft/elf/_elf_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,9 @@ def is_linker_compatible(self, *, linker_version: str) -> bool:
"""Determine if the linker will work given the required glibc version."""
version_required = self.get_required_glibc()
# TODO: pkg_resources is deprecated in setuptools>66 (CRAFT-1598)
is_compatible = parse_version(version_required) <= parse_version(linker_version)
parsed_version_required = parse_version(version_required) # type: ignore
parsed_linker_version = parse_version(linker_version) # type: ignore
is_compatible = parsed_version_required <= parsed_linker_version
emit.debug(
f"Check if linker {linker_version!r} works with GLIBC_{version_required} "
f"required by {str(self.path)!r}: {is_compatible}"
Expand All @@ -341,7 +343,7 @@ def get_required_glibc(self) -> str:
continue
version = version[6:]
# TODO: pkg_resources is deprecated in setuptools>66 (CRAFT-1598)
if parse_version(version) > parse_version(version_required):
if parse_version(version) > parse_version(version_required): # type: ignore
version_required = version

self._required_glibc = version_required
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def test_project_grade_assignment(self, grade, project_yaml_data):
else:
error = ".*unexpected value; permitted: 'stable', 'devel'"
with pytest.raises(pydantic.ValidationError, match=error):
project.grade = grade
project.grade = grade # type: ignore

def test_project_summary_valid(self, project_yaml_data):
summary = "x" * 78
Expand Down

0 comments on commit 687262e

Please sign in to comment.