launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #31287
Re: [Merge] ~andersson123/lpci:add-deb822-support into lpci:main
This looks good so far! We need working tests, and good test coverage, but this seems a lightweight approach that works.
Would we need any user facing documentation changes?
Or will e.g. lpci configuration stay completely the same? Just the implementation needs to change?
Diff comments:
> diff --git a/lpci/utils.py b/lpci/utils.py
> index cd17360..4bcb2aa 100644
> --- a/lpci/utils.py
> +++ b/lpci/utils.py
> @@ -14,10 +14,22 @@ from pathlib import Path
> from typing import Any, Dict
>
> import yaml
> +from distro_info import UbuntuDistroInfo # type: ignore
>
> from lpci.errors import ConfigurationError
>
>
> +def series_has_deb822_support(series: str) -> bool:
> + """Check if a series has deb822 support or not."""
> + udi = UbuntuDistroInfo()
> + assert udi.valid(series)
> + deb822_introduced = float(
I would probably split the version on the dot and then compare things.. using floats for version number comparisons might work, but feels a bit hacky.
> + "23.10"
> + ) # Written like this to avoid confusion - introduced in mantic
> + series_version = float(udi.version(series).replace("LTS", ""))
> + return series_version > deb822_introduced
> +
> +
> def load_yaml(path: Path) -> Dict[Any, Any]:
> """Return the content of a YAML file."""
> if not path.is_file():
--
https://code.launchpad.net/~andersson123/lpci/+git/lpci/+merge/470016
Your team Launchpad code reviewers is requested to review the proposed merge of ~andersson123/lpci:add-deb822-support into lpci:main.
Follow ups