Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-distro for openSUSE:Factory 
checked in at 2023-01-03 15:04:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-distro (Old)
 and      /work/SRC/openSUSE:Factory/.python-distro.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-distro"

Tue Jan  3 15:04:35 2023 rev:17 rq:1046109 version:1.8.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-distro/python-distro.changes      
2022-02-17 00:31:01.457428194 +0100
+++ /work/SRC/openSUSE:Factory/.python-distro.new.1563/python-distro.changes    
2023-01-03 15:04:44.790293141 +0100
@@ -1,0 +2,14 @@
+Mon Jan  2 09:26:27 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 1.8.0:
+  * Lowered `LinuxDistribution._distro_release_info` method complexity
+    [#327]
+  * Added official support for Buildroot distribution [#329]
+  * Added official support for Guix distribution [#330]
+  * Added support for `/etc/debian_version` [#333] & [#349]
+  * Fixed a typography in CONTRIBUTING.md [#340]
+  * Improved README.md "Usage" code block [#343]
+  * Bumped black to v22.3.0 in pre-commit.ci configuration [#331]
+  * Enabled GitHub Dependabot to keep GitHub Actions up to date [#335]
+
+-------------------------------------------------------------------

Old:
----
  distro-1.7.0.tar.gz

New:
----
  distro-1.8.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-distro.spec ++++++
--- /var/tmp/diff_new_pack.VJZqUK/_old  2023-01-03 15:04:45.294296083 +0100
+++ /var/tmp/diff_new_pack.VJZqUK/_new  2023-01-03 15:04:45.298296106 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-distro
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -20,7 +20,7 @@
 %{!?license: %global license %doc}
 %bcond_without test
 Name:           python-distro
-Version:        1.7.0
+Version:        1.8.0
 Release:        0
 Summary:        Linux Distribution - a Linux OS platform information API
 License:        Apache-2.0
@@ -28,7 +28,8 @@
 URL:            https://github.com/nir0s/distro
 Source:         
https://files.pythonhosted.org/packages/source/d/distro/distro-%{version}.tar.gz
 Patch0:         assert_locale.patch
-BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module pip}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  python-rpm-macros
 Requires(post): update-alternatives
 Requires(postun):update-alternatives
@@ -52,10 +53,10 @@
 %patch0 -p1
 
 %build
-%python_build
+%pyproject_wheel
 
 %install
-%python_install
+%pyproject_install
 %python_clone -a %{buildroot}%{_bindir}/distro
 
 %if %{with test}

++++++ distro-1.7.0.tar.gz -> distro-1.8.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/distro-1.7.0/CHANGELOG.md 
new/distro-1.8.0/CHANGELOG.md
--- old/distro-1.7.0/CHANGELOG.md       2022-02-15 19:15:08.000000000 +0100
+++ new/distro-1.8.0/CHANGELOG.md       2022-10-10 17:29:59.000000000 +0200
@@ -1,3 +1,20 @@
+## 1.8.0 (2022.10.10)
+
+BACKWARD COMPATIBILITY:
+* Replace `setup.py` with `build` 
[[#342](https://github.com/python-distro/distro/pull/342)]
+
+ENHANCEMENTS:
+* Lowered `LinuxDistribution._distro_release_info` method complexity 
[[#327](https://github.com/python-distro/distro/pull/327)]
+* Added official support for Buildroot distribution 
[[#329](https://github.com/python-distro/distro/pull/329)]
+* Added official support for Guix distribution 
[[#330](https://github.com/python-distro/distro/pull/330)]
+* Added support for `/etc/debian_version` 
[[#333](https://github.com/python-distro/distro/pull/333)] & 
[[#349](https://github.com/python-distro/distro/pull/349)]
+* Fixed a typography in CONTRIBUTING.md 
[[#340](https://github.com/python-distro/distro/pull/340)]
+* Improved README.md "Usage" code block 
[[#343](https://github.com/python-distro/distro/pull/343)]
+
+RELEASE:
+* Bumped black to v22.3.0 in pre-commit.ci configuration 
[[#331](https://github.com/python-distro/distro/pull/331)]
+* Enabled GitHub Dependabot to keep GitHub Actions up to date 
[[#335](https://github.com/python-distro/distro/pull/335)]
+
 ## 1.7.0 (2022.02.15)
 
 BACKWARD COMPATIBILITY:
@@ -130,7 +147,7 @@
 ## 1.0.4 (2017.04.01)
 
 BUG FIXES:
-* Guess common *-release files if /etc not readable 
[[#175](https://github.com/python-distro/distro/issues/175)]
+* Guess common \*-release files if /etc not readable 
[[#175](https://github.com/python-distro/distro/issues/175)]
 
 ## 1.0.3 (2017.03.19)
 
@@ -213,4 +230,3 @@
 
 DOCS:
 * Documentation fixes
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/distro-1.7.0/CONTRIBUTING.md 
new/distro-1.8.0/CONTRIBUTING.md
--- old/distro-1.7.0/CONTRIBUTING.md    2022-02-15 19:15:08.000000000 +0100
+++ new/distro-1.8.0/CONTRIBUTING.md    2022-10-10 17:29:59.000000000 +0200
@@ -49,6 +49,6 @@
     self._test_outcome(desired_outcome, 'centos', '5')
 ```
 
-Where the name of the method is not indicative of the lookup folder but rather 
tha two last arguments in `_test_outcome`.
+Where the name of the method is not indicative of the lookup folder but rather 
the two last arguments in `_test_outcome`.
 
-A test case is mandatory under `TestOverall` for a PR to be complete.
\ No newline at end of file
+A test case is mandatory under `TestOverall` for a PR to be complete.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/distro-1.7.0/Makefile new/distro-1.8.0/Makefile
--- old/distro-1.7.0/Makefile   2022-02-15 19:15:08.000000000 +0100
+++ new/distro-1.8.0/Makefile   2022-10-10 17:29:59.000000000 +0200
@@ -54,7 +54,7 @@
 
 .PHONY: build
 build:
-       python setup.py sdist bdist_wheel
+       python -m build
 
 .PHONY: publish
 publish:
@@ -72,12 +72,12 @@
 .PHONY: instdev
 instdev:
        pip install -r dev-requirements.txt
-       python setup.py develop
+       pip install -e .
        @echo "$@ done."
 
 .PHONY: install
 install:
-       python setup.py install
+       pip install .
        @echo "$@ done."
 
 .PHONY: clobber
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/distro-1.7.0/PKG-INFO new/distro-1.8.0/PKG-INFO
--- old/distro-1.7.0/PKG-INFO   2022-02-15 19:15:16.928242000 +0100
+++ new/distro-1.8.0/PKG-INFO   2022-10-10 17:30:16.597277400 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: distro
-Version: 1.7.0
+Version: 1.8.0
 Summary: Distro - an OS platform information API
 Home-page: https://github.com/python-distro/distro
 Author: Nir Cohen
@@ -106,8 +106,12 @@
 
 $ python
 >>> import distro
->>> distro.linux_distribution(full_distribution_name=False)
-('centos', '7.1.1503', 'Core')
+>>> distro.name(pretty=True)
+'CentOS Linux 8'
+>>> distro.id()
+'centos'
+>>> distro.version(best=True)
+'8.4.2105'
 ```
 
 
@@ -177,5 +181,3 @@
 * https://packages.gentoo.org/packages/dev-python/distro
 * https://pkgs.org/download/python3-distro
 * https://slackbuilds.org/repository/14.2/python/python-distro/
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/distro-1.7.0/README.md new/distro-1.8.0/README.md
--- old/distro-1.7.0/README.md  2022-02-15 19:15:08.000000000 +0100
+++ new/distro-1.8.0/README.md  2022-10-10 17:29:59.000000000 +0200
@@ -75,8 +75,12 @@
 
 $ python
 >>> import distro
->>> distro.linux_distribution(full_distribution_name=False)
-('centos', '7.1.1503', 'Core')
+>>> distro.name(pretty=True)
+'CentOS Linux 8'
+>>> distro.id()
+'centos'
+>>> distro.version(best=True)
+'8.4.2105'
 ```
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/distro-1.7.0/pyproject.toml 
new/distro-1.8.0/pyproject.toml
--- old/distro-1.7.0/pyproject.toml     1970-01-01 01:00:00.000000000 +0100
+++ new/distro-1.8.0/pyproject.toml     2022-10-10 17:29:59.000000000 +0200
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["setuptools"]
+build-backend = "setuptools.build_meta"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/distro-1.7.0/setup.py new/distro-1.8.0/setup.py
--- old/distro-1.7.0/setup.py   2022-02-15 19:15:08.000000000 +0100
+++ new/distro-1.8.0/setup.py   1970-01-01 01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-# Copyright 2015-2020 Nir Cohen
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from setuptools import setup
-
-setup()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/distro-1.7.0/src/distro/distro.py 
new/distro-1.8.0/src/distro/distro.py
--- old/distro-1.7.0/src/distro/distro.py       2022-02-15 19:15:08.000000000 
+0100
+++ new/distro-1.8.0/src/distro/distro.py       2022-10-10 17:29:59.000000000 
+0200
@@ -55,7 +55,7 @@
     # Python 3.7
     TypedDict = dict
 
-__version__ = "1.7.0"
+__version__ = "1.8.0"
 
 
 class VersionDict(TypedDict):
@@ -122,6 +122,26 @@
 # Pattern for base file name of distro release file
 _DISTRO_RELEASE_BASENAME_PATTERN = re.compile(r"(\w+)[-_](release|version)$")
 
+# Base file names to be looked up for if _UNIXCONFDIR is not readable.
+_DISTRO_RELEASE_BASENAMES = [
+    "SuSE-release",
+    "arch-release",
+    "base-release",
+    "centos-release",
+    "fedora-release",
+    "gentoo-release",
+    "mageia-release",
+    "mandrake-release",
+    "mandriva-release",
+    "mandrivalinux-release",
+    "manjaro-release",
+    "oracle-release",
+    "redhat-release",
+    "rocky-release",
+    "sl-release",
+    "slackware-version",
+]
+
 # Base file names to be ignored when searching for distro release file
 _DISTRO_RELEASE_IGNORE_BASENAMES = (
     "debian_version",
@@ -200,6 +220,7 @@
     "opensuse"      openSUSE
     "amzn"          Amazon Linux
     "arch"          Arch Linux
+    "buildroot"     Buildroot
     "cloudlinux"    CloudLinux OS
     "exherbo"       Exherbo Linux
     "gentoo"        GenToo Linux
@@ -221,6 +242,7 @@
     "midnightbsd"   MidnightBSD
     "rocky"         Rocky Linux
     "aix"           AIX
+    "guix"          Guix System
     ==============  =========================================
 
     If you have a need to get distros for reliable IDs added into this set,
@@ -876,6 +898,9 @@
         if self.uname_attr("id").startswith("aix"):
             # On AIX platforms, prefer oslevel command output.
             versions.insert(0, self.oslevel_info())
+        elif self.id() == "debian" or "debian" in self.like().split():
+            # On Debian-like, add debian_version file content to candidates 
list.
+            versions.append(self._debian_version)
         version = ""
         if best:
             # This algorithm uses the last version in priority order that has
@@ -1186,6 +1211,16 @@
             return ""
         return self._to_str(stdout).strip()
 
+    @cached_property
+    def _debian_version(self) -> str:
+        try:
+            with open(
+                os.path.join(self.etc_dir, "debian_version"), encoding="ascii"
+            ) as fp:
+                return fp.readline().rstrip()
+        except FileNotFoundError:
+            return ""
+
     @staticmethod
     def _parse_uname_content(lines: Sequence[str]) -> Dict[str, str]:
         if not lines:
@@ -1228,14 +1263,14 @@
             # file), because we want to use what was specified as best as
             # possible.
             match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
-            if "name" in distro_info and "cloudlinux" in 
distro_info["name"].lower():
-                distro_info["id"] = "cloudlinux"
-            elif match:
-                distro_info["id"] = match.group(1)
-            return distro_info
         else:
             try:
-                basenames = os.listdir(self.etc_dir)
+                basenames = [
+                    basename
+                    for basename in os.listdir(self.etc_dir)
+                    if basename not in _DISTRO_RELEASE_IGNORE_BASENAMES
+                    and os.path.isfile(os.path.join(self.etc_dir, basename))
+                ]
                 # We sort for repeatability in cases where there are multiple
                 # distro specific files; e.g. CentOS, Oracle, Enterprise all
                 # containing `redhat-release` on top of their own.
@@ -1245,39 +1280,29 @@
                 # sure about the *-release files. Check common entries of
                 # /etc for information. If they turn out to not be there the
                 # error is handled in `_parse_distro_release_file()`.
-                basenames = [
-                    "SuSE-release",
-                    "arch-release",
-                    "base-release",
-                    "centos-release",
-                    "fedora-release",
-                    "gentoo-release",
-                    "mageia-release",
-                    "mandrake-release",
-                    "mandriva-release",
-                    "mandrivalinux-release",
-                    "manjaro-release",
-                    "oracle-release",
-                    "redhat-release",
-                    "rocky-release",
-                    "sl-release",
-                    "slackware-version",
-                ]
+                basenames = _DISTRO_RELEASE_BASENAMES
             for basename in basenames:
-                if basename in _DISTRO_RELEASE_IGNORE_BASENAMES:
-                    continue
                 match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
-                if match:
-                    filepath = os.path.join(self.etc_dir, basename)
-                    distro_info = self._parse_distro_release_file(filepath)
-                    if "name" in distro_info:
-                        # The name is always present if the pattern matches
-                        self.distro_release_file = filepath
-                        distro_info["id"] = match.group(1)
-                        if "cloudlinux" in distro_info["name"].lower():
-                            distro_info["id"] = "cloudlinux"
-                        return distro_info
-            return {}
+                if match is None:
+                    continue
+                filepath = os.path.join(self.etc_dir, basename)
+                distro_info = self._parse_distro_release_file(filepath)
+                # The name is always present if the pattern matches.
+                if "name" not in distro_info:
+                    continue
+                self.distro_release_file = filepath
+                break
+            else:  # the loop didn't "break": no candidate.
+                return {}
+
+        if match is not None:
+            distro_info["id"] = match.group(1)
+
+        # CloudLinux < 7: manually enrich info with proper id.
+        if "cloudlinux" in distro_info.get("name", "").lower():
+            distro_info["id"] = "cloudlinux"
+
+        return distro_info
 
     def _parse_distro_release_file(self, filepath: str) -> Dict[str, str]:
         """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/distro-1.7.0/src/distro.egg-info/PKG-INFO 
new/distro-1.8.0/src/distro.egg-info/PKG-INFO
--- old/distro-1.7.0/src/distro.egg-info/PKG-INFO       2022-02-15 
19:15:16.000000000 +0100
+++ new/distro-1.8.0/src/distro.egg-info/PKG-INFO       2022-10-10 
17:30:16.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: distro
-Version: 1.7.0
+Version: 1.8.0
 Summary: Distro - an OS platform information API
 Home-page: https://github.com/python-distro/distro
 Author: Nir Cohen
@@ -106,8 +106,12 @@
 
 $ python
 >>> import distro
->>> distro.linux_distribution(full_distribution_name=False)
-('centos', '7.1.1503', 'Core')
+>>> distro.name(pretty=True)
+'CentOS Linux 8'
+>>> distro.id()
+'centos'
+>>> distro.version(best=True)
+'8.4.2105'
 ```
 
 
@@ -177,5 +181,3 @@
 * https://packages.gentoo.org/packages/dev-python/distro
 * https://pkgs.org/download/python3-distro
 * https://slackbuilds.org/repository/14.2/python/python-distro/
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/distro-1.7.0/src/distro.egg-info/SOURCES.txt 
new/distro-1.8.0/src/distro.egg-info/SOURCES.txt
--- old/distro-1.7.0/src/distro.egg-info/SOURCES.txt    2022-02-15 
19:15:16.000000000 +0100
+++ new/distro-1.8.0/src/distro.egg-info/SOURCES.txt    2022-10-10 
17:30:16.000000000 +0200
@@ -6,9 +6,9 @@
 Makefile
 README.md
 dev-requirements.txt
+pyproject.toml
 query_local_distro.py
 setup.cfg
-setup.py
 docs/conf.py
 docs/index.rst
 src/distro/__init__.py
@@ -35,6 +35,7 @@
 tests/resources/distros/arch/etc/arch-release
 tests/resources/distros/arch/etc/os-release
 tests/resources/distros/arch/usr/lib/os-release
+tests/resources/distros/buildroot/etc/os-release
 tests/resources/distros/centos5/etc/centos-release
 tests/resources/distros/centos5/etc/redhat-release
 tests/resources/distros/centos5/etc/system-release
@@ -48,6 +49,9 @@
 tests/resources/distros/cloudlinux7/etc/redhat-release
 tests/resources/distros/coreos/etc/oem-release
 tests/resources/distros/coreos/etc/os-release
+tests/resources/distros/debian10/bin/lsb_release
+tests/resources/distros/debian10/etc/debian_version
+tests/resources/distros/debian10/etc/os-release
 tests/resources/distros/debian8/bin/lsb_release
 tests/resources/distros/debian8/etc/debian_version
 tests/resources/distros/debian8/etc/os-release
@@ -72,6 +76,7 @@
 tests/resources/distros/freebsd111/bin/uname
 tests/resources/distros/gentoo/etc/gentoo-release
 tests/resources/distros/gentoo/etc/os-release
+tests/resources/distros/guix/etc/os-release
 tests/resources/distros/kali/etc/os-release
 tests/resources/distros/kvmibm1/bin/lsb_release
 tests/resources/distros/kvmibm1/etc/base-release
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/distro-1.7.0/tests/resources/distros/buildroot/etc/os-release 
new/distro-1.8.0/tests/resources/distros/buildroot/etc/os-release
--- old/distro-1.7.0/tests/resources/distros/buildroot/etc/os-release   
1970-01-01 01:00:00.000000000 +0100
+++ new/distro-1.8.0/tests/resources/distros/buildroot/etc/os-release   
2022-10-10 17:29:59.000000000 +0200
@@ -0,0 +1,5 @@
+NAME=Buildroot
+VERSION=2022.02
+ID=buildroot
+VERSION_ID=2022.02
+PRETTY_NAME="Buildroot 2022.02"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/distro-1.7.0/tests/resources/distros/debian10/bin/lsb_release 
new/distro-1.8.0/tests/resources/distros/debian10/bin/lsb_release
--- old/distro-1.7.0/tests/resources/distros/debian10/bin/lsb_release   
1970-01-01 01:00:00.000000000 +0100
+++ new/distro-1.8.0/tests/resources/distros/debian10/bin/lsb_release   
2022-10-10 17:29:59.000000000 +0200
@@ -0,0 +1,21 @@
+#!/bin/bash
+#
+# lsb_release command for testing the ld module.
+# Only the -a option is supported.
+#
+# This version of the lsb_release command works without a corresponding
+# etc/lsb-release file.
+#
+
+if [[ "$@" != "-a" ]]; then
+  echo "Usage: lsb_release -a"
+  exit 2
+fi
+
+echo "No LSB modules are available."
+echo "Distributor ID:  Debian"
+echo "Description:     Debian GNU/Linux 10 (buster)"
+echo "Release: 10"
+echo "Codename:        buster"
+
+exit 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/distro-1.7.0/tests/resources/distros/debian10/etc/debian_version 
new/distro-1.8.0/tests/resources/distros/debian10/etc/debian_version
--- old/distro-1.7.0/tests/resources/distros/debian10/etc/debian_version        
1970-01-01 01:00:00.000000000 +0100
+++ new/distro-1.8.0/tests/resources/distros/debian10/etc/debian_version        
2022-10-10 17:29:59.000000000 +0200
@@ -0,0 +1 @@
+10.11
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/distro-1.7.0/tests/resources/distros/debian10/etc/os-release 
new/distro-1.8.0/tests/resources/distros/debian10/etc/os-release
--- old/distro-1.7.0/tests/resources/distros/debian10/etc/os-release    
1970-01-01 01:00:00.000000000 +0100
+++ new/distro-1.8.0/tests/resources/distros/debian10/etc/os-release    
2022-10-10 17:29:59.000000000 +0200
@@ -0,0 +1,9 @@
+PRETTY_NAME="Debian GNU/Linux 10 (buster)"
+NAME="Debian GNU/Linux"
+VERSION_ID="10"
+VERSION="10 (buster)"
+VERSION_CODENAME=buster
+ID=debian
+HOME_URL="https://www.debian.org/";
+SUPPORT_URL="https://www.debian.org/support";
+BUG_REPORT_URL="https://bugs.debian.org/";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/distro-1.7.0/tests/resources/distros/guix/etc/os-release 
new/distro-1.8.0/tests/resources/distros/guix/etc/os-release
--- old/distro-1.7.0/tests/resources/distros/guix/etc/os-release        
1970-01-01 01:00:00.000000000 +0100
+++ new/distro-1.8.0/tests/resources/distros/guix/etc/os-release        
2022-10-10 17:29:59.000000000 +0200
@@ -0,0 +1,8 @@
+NAME="Guix System"
+ID=guix
+PRETTY_NAME="Guix System"
+LOGO=guix-icon
+HOME_URL="https://guix.gnu.org";
+DOCUMENTATION_URL="https://guix.gnu.org/en/manual";
+SUPPORT_URL="https://guix.gnu.org/en/help";
+BUG_REPORT_URL="https://lists.gnu.org/mailman/listinfo/bug-guix";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/distro-1.7.0/tests/test_distro.py 
new/distro-1.8.0/tests/test_distro.py
--- old/distro-1.7.0/tests/test_distro.py       2022-02-15 19:15:08.000000000 
+0100
+++ new/distro-1.8.0/tests/test_distro.py       2022-10-10 17:29:59.000000000 
+0200
@@ -138,11 +138,10 @@
 class TestOSRelease:
     def setup_method(self, test_method: FunctionType) -> None:
         dist = test_method.__name__.split("_")[1]
-        os_release = os.path.join(DISTROS_DIR, dist, "etc", "os-release")
         self.distro = distro.LinuxDistribution(
             include_lsb=False,
-            os_release_file=os_release,
             distro_release_file="path-to-non-existing-file",
+            root_dir=os.path.join(DISTROS_DIR, dist),
         )
 
     def _test_outcome(self, outcome: Dict[str, str]) -> None:
@@ -163,6 +162,17 @@
         }
         self._test_outcome(desired_outcome)
 
+    def test_buildroot_os_release(self) -> None:
+        desired_outcome = {
+            "id": "buildroot",
+            "name": "Buildroot",
+            "pretty_name": "Buildroot 2022.02",
+            "version": "2022.02",
+            "pretty_version": "2022.02",
+            "best_version": "2022.02",
+        }
+        self._test_outcome(desired_outcome)
+
     def test_kali_os_release(self) -> None:
         desired_outcome = {
             "id": "kali",
@@ -206,11 +216,23 @@
             "pretty_name": "Debian GNU/Linux 8 (jessie)",
             "version": "8",
             "pretty_version": "8 (jessie)",
-            "best_version": "8",
+            "best_version": "8.2",
             "codename": "jessie",
         }
         self._test_outcome(desired_outcome)
 
+    def test_debian10_os_release(self) -> None:
+        desired_outcome = {
+            "id": "debian",
+            "name": "Debian GNU/Linux",
+            "pretty_name": "Debian GNU/Linux 10 (buster)",
+            "version": "10",
+            "pretty_version": "10 (buster)",
+            "best_version": "10.11",
+            "codename": "buster",
+        }
+        self._test_outcome(desired_outcome)
+
     def test_fedora19_os_release(self) -> None:
         desired_outcome = {
             "id": "fedora",
@@ -251,6 +273,14 @@
         }
         self._test_outcome(desired_outcome)
 
+    def test_guix_os_release(self) -> None:
+        desired_outcome = {
+            "id": "guix",
+            "name": "Guix System",
+            "pretty_name": "Guix System",
+        }
+        self._test_outcome(desired_outcome)
+
     def test_kvmibm1_os_release(self) -> None:
         desired_outcome = {
             "id": "kvmibm",
@@ -327,7 +357,7 @@
             "pretty_name": "Raspbian GNU/Linux 7 (wheezy)",
             "version": "7",
             "pretty_version": "7 (wheezy)",
-            "best_version": "7",
+            "best_version": "7.1",
             "like": "debian",
             "codename": "wheezy",
         }
@@ -340,7 +370,7 @@
             "pretty_name": "Raspbian GNU/Linux 8 (jessie)",
             "version": "8",
             "pretty_version": "8 (jessie)",
-            "best_version": "8",
+            "best_version": "8.0",
             "like": "debian",
             "codename": "jessie",
         }
@@ -1211,6 +1241,20 @@
         self._test_outcome(desired_outcome)
         self._test_non_existing_release_file()
 
+    def test_debian10_release(self) -> None:
+        desired_outcome = {
+            "id": "debian",
+            "name": "Debian GNU/Linux",
+            "pretty_name": "Debian GNU/Linux 10 (buster)",
+            "version": "10",
+            "pretty_version": "10 (buster)",
+            "best_version": "10.11",
+            "codename": "buster",
+            "major_version": "10",
+        }
+        self._test_outcome(desired_outcome)
+        self._test_non_existing_release_file()
+
     def test_exherbo_release(self) -> None:
         desired_outcome = {
             "id": "exherbo",
@@ -1429,7 +1473,7 @@
             "pretty_name": "Raspbian GNU/Linux 7 (wheezy)",
             "version": "7",
             "pretty_version": "7 (wheezy)",
-            "best_version": "7",
+            "best_version": "7.1",
             "like": "debian",
             "codename": "wheezy",
             "major_version": "7",
@@ -1444,7 +1488,7 @@
             "pretty_name": "Raspbian GNU/Linux 8 (jessie)",
             "version": "8",
             "pretty_version": "8 (jessie)",
-            "best_version": "8",
+            "best_version": "8.0",
             "like": "debian",
             "codename": "jessie",
             "major_version": "8",
@@ -2228,6 +2272,6 @@
         repr_str = repr(distro._distro)
         assert "LinuxDistribution" in repr_str
         for attr in MODULE_DISTRO.__dict__.keys():
-            if attr in ("root_dir", "etc_dir", "usr_lib_dir"):
+            if attr in ("root_dir", "etc_dir", "usr_lib_dir", 
"_debian_version"):
                 continue
             assert f"{attr}=" in repr_str

Reply via email to