Skip to content

Commit

Permalink
Merge pull request #3005 from ariel-anieli/python-bump
Browse files Browse the repository at this point in the history
Bumped minimal Python version to 3.9
  • Loading branch information
nicolargo authored Nov 9, 2024
2 parents af15666 + 2711644 commit 76d8cbe
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ Any and all contributions are greatly appreciated.
Requirements
============

- ``python>=3.8`` (use Glances 3.4.x for lower Python version)
- ``python>=3.9`` (use Glances 3.4.x for lower Python version)
- ``psutil`` (better with latest version)
- ``defusedxml`` (in order to monkey patch xmlrpc)
- ``packaging`` (for the version comparison)
- ``orjson`` (an optimized alternative to the standard json module)

*Note for Python 2 users*

Glances version 4 or higher do not support Python 2 (and Python 3 < 3.8).
Glances version 4 or higher do not support Python 2 (and Python 3 < 3.9).
Please uses Glances version 3.4.x if you need Python 2 support.

Optional dependencies:
Expand Down
12 changes: 2 additions & 10 deletions glances/outputs/glances_restful_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,16 @@
import sys
import tempfile
import webbrowser
from typing import Any, Union
from typing import Annotated, Any, Union
from urllib.parse import urljoin

from glances.stats import GlancesStats

try:
from typing import Annotated
except ImportError:
# Only for Python 3.8
# To be removed when Python 3.8 support will be dropped
from typing_extensions import Annotated

from glances import __apiversion__, __version__
from glances.globals import json_dumps
from glances.logger import logger
from glances.password import GlancesPassword
from glances.servers_list import GlancesServersList
from glances.servers_list_dynamic import GlancesAutoDiscoverClient
from glances.stats import GlancesStats
from glances.timer import Timer

# FastAPI import
Expand Down
2 changes: 1 addition & 1 deletion glances/plugins/gpu/cards/nvidia.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Avoid importing pynvml if NVML_LIB is not installed
from ctypes import CDLL

if (sys.platform[:3] == "win"):
if sys.platform[:3] == "win":
try:
CDLL(os.path.join(os.getenv("WINDIR", "C:/Windows"), "System32/nvml.dll"))
except OSError:
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ classifiers = [
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -34,7 +33,7 @@ keywords = ["cli", "curses", "monitoring", "system"]
license = {text = "LGPLv3"}
name = "Glances"
readme = "README.rst"
requires-python = ">=3.8"
requires-python = ">=3.9"
urls.Homepage = "https://github.com/nicolargo/glances"

[project.optional-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

[tox]
envlist =
py38
py39
py310
py311
py312
py313

[testenv]
deps =
Expand Down

0 comments on commit 76d8cbe

Please sign in to comment.