The packages are stuck on py3.6 which means they will be pain once we switch to 3.7. Please test them on 3.7 *and* 3.8 (so we don't to revisit this in a few months), and update PYTHON_COMPAT appropriately. If it doesn't work, please either fix it, remove Python or issue last rites. Please consider this urgent.
Nagstamon compile and run fine with python 3.7. The only problem is that emerge process can't fill VERSION_ID variable from /etc/os-release since get_distro function don't find it in /etc/os-release and platform.dist() is deprecated in python 3.7. ---------- Traceback (most recent call last): File "setup.py", line 38, in <module> DIST, DIST_VERSION, DIST_NAME = get_distro() File "/gentoo/tmp/portage/net-analyzer/nagstamon-3.4.1/work/Nagstamon/Nagstamon/Helpers.py", line 457, in get_distro return (os_release_dict['ID'], os_release_dict['VERSION_ID'], os_release_dict['NAME']) ---------- Corresponding code: ---------- def get_distro(): """ replacement for platform.dist() which is deprecated and not available anymore since Python 3.8 read content of /etc/os-release and return it - all relevant distros should deliver this file on older Python platform.dist still can be used and even should be on Debian 8 with Python 3.4 :return: """ if sys.version_info > (3,7): os_release_file = Path('/etc/os-release') if os_release_file.exists() and (os_release_file.is_file() or os_release_file.is_symlink()): os_release_dict = {} for property in os_release_file.read_text().splitlines(): key, value = property.split('=', 1) os_release_dict[key] = value.strip('"').strip("'") return (os_release_dict['ID'], os_release_dict['VERSION_ID'], os_release_dict['NAME']) else: return False else: return platform.dist() ---------- Quick and dirty workaround: Add VERSION_ID variable in /etc/os-realease. May be this variable should be filled with baselayout major version. So nagstamon need a little patch to manage VERSION_ID to be emerge with python 3.7.
Ping.
Now, emerge says : !!! The following installed packages are masked: - net-analyzer/nagstamon-3.4.1::gentoo (masked by: package.mask) /usr/portage/profiles/package.mask: # Michał Górny <mgorny@gentoo.org> (2020-08-22) # These packages still require Python 3.6. They are either dead # upstream or their maintainers are simply unresponsive. # Please do not remove any packages from this list unless you actually # port them to Python 3.7 *and* 3.8 (3.9 would also be nice). # Removal in 30 days. Tracker bug #695996. So, if I understand well, nagstamon is fully python 3.8 compatible (see their changelog), but will be removed from portage, just because Gentoo doesn't provide a standard variable into a standard file. Moreover, the mentioned reason for this removal is obviously false. I know that writing a patch can take lots of time and some expertise, and I have none of them. But, here, we don't need a patch, we just need a decision : please, Gentoo maintainers, add a VERSION_ID variable into /etc/os-release.
I'm agree with Sylvain CANOINE. A lot of sysadmins use nagstamon to have a live monitoring on their work desktop. It's not a simple widget but a sysadmin production tool. So IMHO this removal is not welcome. From https://www.man7.org/linux/man-pages/man5/os-release.5.html : VERSION_ID= A lower-case string (mostly numeric, no spaces or other characters outside of 0–9, a–z, ".", "_" and "-") identifying the operating system version, excluding any OS name information or release code name, and suitable for processing by scripts or usage in generated filenames. This field is optional. Example: "VERSION_ID=17" or "VERSION_ID=11.04". So I think a simple patch that check existence of this variable in /etc/os-release before use it should be sufficient since this value once read is not used at all later.
I was on my way to create this simple patch but in fact, that have been already done 5 days ago upstream: https://github.com/HenriWahl/Nagstamon/commit/e755a54ff43a4613462c9c41d24eaacb77c84b28 So we can simply backport this patch and use PYTHON_COMPAT=( python3_7 python3_8 ).
Created attachment 656888 [details, diff] Patch to handle optional VERSION_ID in /etc/os-release
Created attachment 656890 [details] ebuild to handle python-3.7/python-3.8 and VERSION_ID patch
So I've make a quick patch from upstream and corresponding ebuild that solve this issue. Enjoy ;)
So please remove Pending Mask.
It's been fixed upstream: https://github.com/HenriWahl/Nagstamon/issues/655
(In reply to Wojciech Arabczyk from comment #10) > It's been fixed upstream: > > https://github.com/HenriWahl/Nagstamon/issues/655 The patch and ebuiild that I push here 5 days ago come from this commit.
Please make a github PR or mail a patch to either myself (sam@) or the proxy-maintainers list (I guess this is preferred) using git format-patch.
(In reply to Sam James from comment #12) > Please make a github PR or mail a patch to either myself (sam@) or the > proxy-maintainers list (I guess this is preferred) using git format-patch. Here we go. I do my best for my first PR. Hope everything is OK. https://github.com/gentoo/gentoo/pull/17370
> https://github.com/gentoo/gentoo/pull/17370 PR closed and new one to respect GLEP 66 and GLEP 76: NEW PR: https://github.com/gentoo/gentoo/pull/17373
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b133cb91601a776c9bb7ae20266c00a75545df87 commit b133cb91601a776c9bb7ae20266c00a75545df87 Author: Hans de Graaff <graaff@gentoo.org> AuthorDate: 2020-09-05 08:15:35 +0000 Commit: Hans de Graaff <graaff@gentoo.org> CommitDate: 2020-09-05 08:17:00 +0000 net-analyzer/nagstamon: add python 3.7, 3.8 Also become co-maintainer. Closes: https://bugs.gentoo.org/718424 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Hans de Graaff <graaff@gentoo.org> .../files/nagstamon-3.4.1-unknown-version-id.patch | 14 ++++++ net-analyzer/nagstamon/metadata.xml | 4 ++ net-analyzer/nagstamon/nagstamon-3.4.1-r1.ebuild | 53 ++++++++++++++++++++++ 3 files changed, 71 insertions(+)
Sorry, just noticed the recent activity here, but I already had a testing version ready to commit since last weekend. Thanks for your efforts.