<pre style='margin:0'>
Herby Gillot (herbygillot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/3091e9cd1dab0b01ac27598e91149a0eb487b412">https://github.com/macports/macports-ports/commit/3091e9cd1dab0b01ac27598e91149a0eb487b412</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 3091e9cd1da glances: unbreak for old systems
</span>3091e9cd1da is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 3091e9cd1dab0b01ac27598e91149a0eb487b412
</span>Author: barracuda156 <vital.had@gmail.com>
AuthorDate: Thu May 16 23:27:13 2024 +0800
<span style='display:block; white-space:pre;color:#404040;'> glances: unbreak for old systems
</span>---
sysutils/glances/Portfile | 13 +++--
.../files/patch-make-pydantic-optional.diff | 59 ++++++++++++++++++++++
2 files changed, 69 insertions(+), 3 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/sysutils/glances/Portfile b/sysutils/glances/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 72b811d845f..efa38cf2ab9 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/sysutils/glances/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/sysutils/glances/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -6,7 +6,7 @@ PortGroup python 1.0
</span>
github.setup nicolargo glances 4.0.4 v
github.tarball_from archive
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span> categories sysutils
license GPL-3
maintainers nomaintainer
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -27,14 +27,21 @@ python.default_version \
</span> 312
depends_lib-append port:py${python.version}-packaging \
port:py${python.version}-psutil \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- port:py${python.version}-pydantic \
</span> port:py${python.version}-future \
port:py${python.version}-setuptools
<span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${os.platform} eq "darwin" && ${os.major} > 11} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py${python.version}-pydantic
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> depends_run-append port:py${python.version}-defusedxml \
port:py${python.version}-ujson
<span style='display:block; white-space:pre;background:#ffe0e0;'>-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://github.com/nicolargo/glances/pull/2778
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-make-pydantic-optional.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-patch {
</span> reinplace "s|/usr/local|${prefix}|" glances/config.py
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/sysutils/glances/files/patch-make-pydantic-optional.diff b/sysutils/glances/files/patch-make-pydantic-optional.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..08790c0405a
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/sysutils/glances/files/patch-make-pydantic-optional.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,59 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- glances/event.py 2024-05-15 17:20:23.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ glances/event.py 2024-05-16 23:18:13.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -32,7 +32,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ """
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-from pydantic.dataclasses import dataclass
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++from glances.logger import logger
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ from pydantic.dataclasses import dataclass
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++except ImportError as e:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ logger.warning(f"Missing Python Lib ({e}), EventList will be skipping data validation")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ from dataclasses import dataclass
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ from glances.processes import sort_stats
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- glances/events_list.py 2024-05-15 17:20:23.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ glances/events_list.py 2024-05-16 23:16:49.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -11,7 +11,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ import time
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ from datetime import datetime
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-from pydantic import RootModel
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++from dataclasses import asdict
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ from glances.processes import glances_processes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ from glances.thresholds import glances_thresholds
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -201,7 +201,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def get(self):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ """Return the RAW events list."""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return [RootModel[GlancesEvent](e).model_dump() for e in self.events_list]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return [asdict(e) for e in self.events_list]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def len(self):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ """Return the number of events in the logs list."""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- optional-requirements.txt 2024-05-15 17:20:23.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ optional-requirements.txt 2024-05-16 23:16:04.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -22,6 +22,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ potsdb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ prometheus_client
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pycouchdb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pydantic
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pygal
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pymdstat
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pymongo; python_version >= "3.7"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- requirements.txt 2024-05-15 17:20:23.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ requirements.txt 2024-05-16 23:15:29.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2,4 +2,3 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ defusedxml
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ packaging
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ujson>=5.4.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-pydantic
</span></pre><pre style='margin:0'>
</pre>