Accepting request 1082797 from home:amanzini:branches:devel:languages:python

- Update to 3.3.1
  * Minor change on the help screen
  * Refactor some loop in the processes function
  * Replace json by ujson #2201
  * Improvements on documentation, unit test and CI
  * bump dependencies and web lib to address security

OBS-URL: https://build.opensuse.org/request/show/1082797
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Glances?expand=0&rev=48
This commit is contained in:
Dirk Mueller 2023-04-27 21:55:04 +00:00 committed by Git OBS Bridge
parent 0f4de6ed4a
commit ea25880052
9 changed files with 58 additions and 41 deletions

View File

@ -1,7 +1,7 @@
Index: glances-3.1.1/setup.py Index: glances-3.3.1/setup.py
=================================================================== ===================================================================
--- glances-3.1.1.orig/setup.py --- glances-3.3.1.orig/setup.py
+++ glances-3.1.1/setup.py +++ glances-3.3.1/setup.py
@@ -32,8 +32,6 @@ with open('README.rst', encoding='utf-8' @@ -32,8 +32,6 @@ with open('README.rst', encoding='utf-8'
def get_data_files(): def get_data_files():

View File

@ -1,6 +1,7 @@
diff -ur glances-3.2.7.orig/unitest-restful.py glances-3.2.7/unitest-restful.py Index: glances-3.3.1/unitest-restful.py
--- glances-3.2.7.orig/unitest-restful.py 2022-07-28 18:10:35.000000000 +0200 ===================================================================
+++ glances-3.2.7/unitest-restful.py 2022-07-28 20:22:43.516291302 +0200 --- glances-3.3.1.orig/unitest-restful.py
+++ glances-3.3.1/unitest-restful.py
@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
import shlex import shlex
@ -9,18 +10,19 @@ diff -ur glances-3.2.7.orig/unitest-restful.py glances-3.2.7/unitest-restful.py
import time import time
import numbers import numbers
import unittest import unittest
@@ -54,7 +55,7 @@ @@ -58,7 +59,7 @@ class TestGlances(unittest.TestCase):
global pid if os.path.isfile("./venv/bin/python"):
cmdline = "./venv/bin/python"
print('INFO: [TEST_000] Start the Glances Web Server') else:
- cmdline = "python -m glances -B localhost -w -p %s" % SERVER_PORT - cmdline = "python"
+ cmdline = "%s -m glances -B localhost -w -p %s" % (sys.executable, SERVER_PORT) + cmdline = sys.executable
cmdline += " -m glances -B localhost -w -p %s" % SERVER_PORT
print("Run the Glances Web Server on port %s" % SERVER_PORT) print("Run the Glances Web Server on port %s" % SERVER_PORT)
args = shlex.split(cmdline) args = shlex.split(cmdline)
pid = subprocess.Popen(args) Index: glances-3.3.1/unitest-xmlrpc.py
diff -ur glances-3.2.7.orig/unitest-xmlrpc.py glances-3.2.7/unitest-xmlrpc.py ===================================================================
--- glances-3.2.7.orig/unitest-xmlrpc.py 2022-07-28 18:10:35.000000000 +0200 --- glances-3.3.1.orig/unitest-xmlrpc.py
+++ glances-3.2.7/unitest-xmlrpc.py 2022-07-28 20:22:49.160260716 +0200 +++ glances-3.3.1/unitest-xmlrpc.py
@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
import json import json
import shlex import shlex
@ -28,13 +30,13 @@ diff -ur glances-3.2.7.orig/unitest-xmlrpc.py glances-3.2.7/unitest-xmlrpc.py
+import sys +import sys
import time import time
import unittest import unittest
import os
@@ -43,7 +44,7 @@ @@ -47,7 +48,7 @@ class TestGlances(unittest.TestCase):
global pid if os.path.isfile("./venv/bin/python"):
cmdline = "./venv/bin/python"
print('INFO: [TEST_000] Start the Glances Web Server') else:
- cmdline = "python -m glances -B localhost -s -p %s" % SERVER_PORT - cmdline = "python"
+ cmdline = "%s -m glances -s -p %s" % (sys.executable, SERVER_PORT) + cmdline = sys.executable
cmdline += " -m glances -B localhost -s -p %s" % SERVER_PORT
print("Run the Glances Server on port %s" % SERVER_PORT) print("Run the Glances Server on port %s" % SERVER_PORT)
args = shlex.split(cmdline) args = shlex.split(cmdline)
pid = subprocess.Popen(args)

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue Apr 25 15:51:39 UTC 2023 - Andrea Manzini <andrea.manzini@suse.com>
- Update to 3.3.1
* Minor change on the help screen
* Refactor some loop in the processes function
* Replace json by ujson #2201
* Improvements on documentation, unit test and CI
* bump dependencies and web lib to address security
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Nov 7 20:12:07 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com> Mon Nov 7 20:12:07 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package python-Glances # spec file for package python-Glances
# #
# Copyright (c) 2022 SUSE LLC # Copyright (c) 2023 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -18,7 +18,7 @@
%define skip_python2 1 %define skip_python2 1
Name: python-Glances Name: python-Glances
Version: 3.3.0.4 Version: 3.3.1
Release: 0 Release: 0
Summary: A cross-platform curses-based monitoring tool Summary: A cross-platform curses-based monitoring tool
License: LGPL-3.0-only License: LGPL-3.0-only
@ -37,6 +37,7 @@ BuildRequires: %{python_module future}
BuildRequires: %{python_module psutil >= 5.3.0} BuildRequires: %{python_module psutil >= 5.3.0}
BuildRequires: %{python_module requests} BuildRequires: %{python_module requests}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module ujson}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: python-bottle Requires: python-bottle
@ -44,6 +45,7 @@ Requires: python-defusedxml
Requires: python-future Requires: python-future
Requires: python-psutil >= 5.3.0 Requires: python-psutil >= 5.3.0
Requires: python-requests Requires: python-requests
Requires: python-ujson
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun):update-alternatives Requires(postun):update-alternatives
Recommends: python-curses Recommends: python-curses
@ -124,6 +126,9 @@ export LANG=en_US.UTF-8
%python_alternative %{_mandir}/man1/glances.1%{?ext_man} %python_alternative %{_mandir}/man1/glances.1%{?ext_man}
%{python_sitelib}/glances %{python_sitelib}/glances
%{python_sitelib}/Glances-%{version}*-info %{python_sitelib}/Glances-%{version}*-info
%exclude %{python_sitelib}/glances/outputs/static/.eslintrc.js
%exclude %{python_sitelib}/glances/outputs/static/.gitignore
%exclude %{python_sitelib}/glances/outputs/static/.prettierrc.js
%files -n glances-common %files -n glances-common
%dir %{_prefix}/lib/firewalld %dir %{_prefix}/lib/firewalld

View File

@ -1,7 +1,7 @@
diff --git a/glances/__main__.py b/glances/__main__.py Index: glances-3.3.1/glances/__main__.py
index 197d5ce..3889719 100644 ===================================================================
--- a/glances/__main__.py --- glances-3.3.1.orig/glances/__main__.py
+++ b/glances/__main__.py +++ glances-3.3.1/glances/__main__.py
@@ -1,4 +1,3 @@ @@ -1,4 +1,3 @@
-#!/usr/bin/env python -#!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-

View File

@ -1,8 +1,8 @@
Index: glances-3.1.1/unitest.py Index: glances-3.3.1/unitest.py
=================================================================== ===================================================================
--- glances-3.1.1.orig/unitest.py --- glances-3.3.1.orig/unitest.py
+++ glances-3.1.1/unitest.py +++ glances-3.3.1/unitest.py
@@ -191,6 +191,7 @@ class TestGlances(unittest.TestCase): @@ -188,6 +188,7 @@ class TestGlances(unittest.TestCase):
self.assertTrue(type(stats_grab) is list, msg='Folders stats is not a list') self.assertTrue(type(stats_grab) is list, msg='Folders stats is not a list')
print('INFO: Folders stats: %s' % stats_grab) print('INFO: Folders stats: %s' % stats_grab)

View File

@ -1,8 +1,8 @@
Index: glances-3.1.5/unitest-xmlrpc.py Index: glances-3.3.1/unitest-xmlrpc.py
=================================================================== ===================================================================
--- glances-3.1.5.orig/unitest-xmlrpc.py --- glances-3.3.1.orig/unitest-xmlrpc.py
+++ glances-3.1.5/unitest-xmlrpc.py +++ glances-3.3.1/unitest-xmlrpc.py
@@ -59,7 +59,7 @@ class TestGlances(unittest.TestCase): @@ -54,7 +54,7 @@ class TestGlances(unittest.TestCase):
args = shlex.split(cmdline) args = shlex.split(cmdline)
pid = subprocess.Popen(args) pid = subprocess.Popen(args)
print("Please wait...") print("Please wait...")

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:464905c9b4806b80782eb8e43552ccbfa346d6f905f8a2d28de48613ccba0e53
size 6144597

3
v3.3.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ab12ff835b688aecf3295e813085cabef3f92e72ff540e7475773df18e599d5d
size 6198972