Skip to content

Commit

Permalink
Bumped minimal Python version to 3.9
Browse files Browse the repository at this point in the history
* Python 3.8 is now end of life [Link]
* changed occurrences found with `git grep -P '[^\d\.]3\.8[^\d]'`
* so doing, removed unused branch in `glances/outputs/glances_restful_api.py`
* branch introduced by f654558
* ruff also needs a bump; i.e, `s/py38/py39/`
* not done yet, since it needs to clear out warnings.

Link: https://devguide.python.org/versions/
Signed-off-by: Ariel Otilibili <[email protected]>
  • Loading branch information
ariel-anieli committed Nov 8, 2024
1 parent 114435e commit b537f45
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 16 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
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 b537f45

Please sign in to comment.