From 27ed34e3e49039788d1565f2b33bd9406b08c918 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Fri, 5 Feb 2021 08:56:24 -0800 Subject: [PATCH] dstat: patch to silence collections warnings Development on dstat is dead so whenever Python makes good on their threat of removing direct access to collections.Sequence it will fail. --- srcpkgs/dstat/patches/dstat.patch | 20 ++++++++++++++++++++ srcpkgs/dstat/template | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/dstat/patches/dstat.patch diff --git a/srcpkgs/dstat/patches/dstat.patch b/srcpkgs/dstat/patches/dstat.patch new file mode 100644 index 00000000000000..4866b02475530a --- /dev/null +++ b/srcpkgs/dstat/patches/dstat.patch @@ -0,0 +1,20 @@ +--- dstat.orig 2020-11-21 17:50:21.000000000 -0800 ++++ dstat 2021-02-04 22:50:28.970723977 -0800 +@@ -19,7 +19,7 @@ + from __future__ import absolute_import, division, generators, print_function + __metaclass__ = type + +-import collections ++import collections.abc + import fnmatch + import getopt + import getpass +@@ -512,7 +512,7 @@ + scale = self.scales[i] + else: + scale = self.scale +- if isinstance(self.val[name], collections.Sequence) and not isinstance(self.val[name], six.string_types): ++ if isinstance(self.val[name], collections.abc.Sequence) and not isinstance(self.val[name], six.string_types): + line = line + cprintlist(self.val[name], ctype, self.width, scale) + sep = theme['frame'] + char['colon'] + if i + 1 != len(self.vars): diff --git a/srcpkgs/dstat/template b/srcpkgs/dstat/template index 43a7efd6ded9d6..9e9d9d3217ac32 100644 --- a/srcpkgs/dstat/template +++ b/srcpkgs/dstat/template @@ -1,7 +1,7 @@ # Template file for 'dstat' pkgname=dstat version=0.7.4 -revision=3 +revision=4 makedepends="python3" depends="python3-six" short_desc="Versatile tool for generating system resource statistics"