Skip to content

Commit 76ea71f

Browse files
committed
Remove Python 2 in docs and README files
1 parent 15173dd commit 76ea71f

File tree

6 files changed

+20
-54
lines changed

6 files changed

+20
-54
lines changed

Diff for: .github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
13+
python-version: [3.4, 3.5, 3.6, 3.7, 3.8, 3.9]
1414

1515
steps:
1616

Diff for: README.rst

+7-13
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,14 @@ add new plugins or exports modules.
5757
Requirements
5858
============
5959

60-
- ``python>=2.7`` or ``python>=3.4``
60+
- ``python>=3.4``
6161
- ``psutil>=5.3.0`` (better with latest version)
6262
- ``defusedxml`` (in order to monkey patch xmlrpc)
63-
- ``future`` (for Python 2 support)
6463

65-
*Note for Python 2.6 users*
64+
*Note for Python 2 users*
6665

67-
Glances no longer supports Python 2.6. Please upgrade
68-
to a minimum Python version of 2.7/3.4+ or downgrade to Glances 2.6.2 (last version
69-
with Python 2.6 support).
70-
71-
*Deprecation warning note for Python 2.x users*
72-
73-
Glances version 4.0 will no longer supports Python 2.x.
66+
Glances version 4 or higher do not support Python 2.
67+
Please uses Glances version 3 if you need Python 2 support.
7468

7569
Optional dependencies:
7670

@@ -87,7 +81,7 @@ Optional dependencies:
8781
- ``influxdb-client`` (for the InfluxDB version 2 export module) [Only for Python >= 3.6]
8882
- ``kafka-python`` (for the Kafka export module)
8983
- ``netifaces`` (for the IP plugin)
90-
- ``py3nvml`` (for the GPU plugin) [Only for Python 3]
84+
- ``py3nvml`` (for the GPU plugin)
9185
- ``pika`` (for the RabbitMQ/ActiveMQ export module)
9286
- ``potsdb`` (for the OpenTSDB export module)
9387
- ``prometheus_client`` (for the Prometheus export module)
@@ -98,7 +92,7 @@ Optional dependencies:
9892
- ``pySMART.smartx`` (for HDD Smart support) [Linux-only]
9993
- ``pyzmq`` (for the ZeroMQ export module)
10094
- ``requests`` (for the Ports, Cloud plugins and RESTful export module)
101-
- ``scandir`` (for the Folders plugin) [Only for Python < 3.5]
95+
- ``scandir`` (for the Folders plugin) [Only for Python 3.4]
10296
- ``sparklines`` (for the Quick Plugin sparklines option)
10397
- ``statsd`` (for the StatsD export module)
10498
- ``wifi`` (for the wifi plugin) [Linux-only]
@@ -283,7 +277,7 @@ MacPorts
283277
Windows
284278
-------
285279

286-
Install `Python`_ for Windows (Python 2.7.9+ and 3.4+ ship with pip) and
280+
Install `Python`_ for Windows (Python 3.4+ ship with pip) and
287281
then run the following command:
288282

289283
.. code-block:: console

Diff for: glances/README.txt

+2-22
Original file line numberDiff line numberDiff line change
@@ -23,36 +23,16 @@ actions.py Manage trigger actions (via mustache)
2323
snmp.py Glances SNMP client (via pysnmp)
2424
...
2525
plugins
26-
=> Glances data providers
27-
glances_plugins.py "Father class" for others plugins
28-
glances_cpu.py Manage CPU stats
29-
glances_load.py Manage load stats
30-
glances_mem.py Manage RAM stats
31-
glances_memswap.py Manage swap stats
32-
glances_network.py Manage network stats
33-
glances_fs.py Manage file system stats
34-
glances_diskio.py Manage disk I/O stats
35-
glances_docker.py Glances Docker plugin (via docker-py)
36-
glances_raid.py Glances RAID plugin (via pymdstat)
26+
=> Glances plugins
3727
...
3828
outputs
3929
=> Glances UI
4030
glances_curses.py The curses interface
4131
glances_bottle.py The web interface
4232
...
4333
exports
44-
=> Glances export interfaces
45-
glances_export.py "Father class" for exports
46-
glances_csv.py The CSV export module
47-
glances_influxdb.py The InfluxDB export module
48-
glances_mqtt.py The MQTT export module
49-
glances_opentsdb.py The OpenTSDB export module
50-
glances_rabbitmq.py The RabbitMQ export module
51-
glances_statsd.py The StatsD export module
34+
=> Glances exports
5235
...
5336
amps
5437
=> Glances Application Monitoring Processes (AMP)
55-
glances_amp.py "Father class" for AMPs
56-
glances_default.py Default AMP
57-
glances_nginx.py Nginx AMP
5838
...

Diff for: setup.py

+8-16
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,10 @@
99
from setuptools import setup, Command
1010

1111

12-
if sys.version_info < (2, 7) or (3, 0) <= sys.version_info < (3, 4):
13-
print('Glances requires at least Python 2.7 or 3.4 to run.')
12+
if sys.version_info < (3, 4):
13+
print('Glances requires at least Python 3.4 to run.')
1414
sys.exit(1)
1515

16-
PY2 = sys.version_info[0] == 2
17-
PY3 = sys.version_info[0] == 3
18-
19-
2016
# Global functions
2117
##################
2218

@@ -52,14 +48,15 @@ def get_install_requires():
5248
def get_install_extras_require():
5349
extras_require = {
5450
'action': ['chevron'],
55-
'browser': ['zeroconf==0.19.1' if PY2 else 'zeroconf>=0.19.1'],
51+
'browser': ['zeroconf>=0.19.1'],
5652
'cloud': ['requests'],
5753
'docker': ['docker>=2.0.0'],
5854
'export': ['bernhard', 'cassandra-driver', 'couchdb', 'elasticsearch',
59-
'graphitesender', 'influxdb>=1.0.0', 'kafka-python', 'pika',
60-
'paho-mqtt', 'potsdb', 'prometheus_client', 'pyzmq',
61-
'statsd'],
62-
'folders': ['scandir'], # python_version<"3.5"
55+
'graphitesender', 'influxdb>=1.0.0', 'influxdb-client',
56+
'kafka-python', 'pika', 'paho-mqtt', 'potsdb', 'prometheus_client',
57+
'pyzmq', 'statsd'],
58+
'folders': ['scandir'],
59+
'gpu': ['py3nvml'],
6360
'graph': ['pygal'],
6461
'ip': ['netifaces'],
6562
'raid': ['pymdstat'],
@@ -70,9 +67,6 @@ def get_install_extras_require():
7067
'wifi': ['wifi']
7168
#'gpu' and 'sensors' ==> See bellow
7269
}
73-
if PY3:
74-
extras_require['export'].append('influxdb-client')
75-
extras_require['gpu'] = ['py3nvml']
7670
if sys.platform.startswith('linux'):
7771
extras_require['sensors'] = ['batinfo']
7872

@@ -132,8 +126,6 @@ def run(self):
132126
'Intended Audience :: System Administrators',
133127
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
134128
'Operating System :: OS Independent',
135-
'Programming Language :: Python :: 2',
136-
'Programming Language :: Python :: 2.7',
137129
'Programming Language :: Python :: 3',
138130
'Programming Language :: Python :: 3.4',
139131
'Programming Language :: Python :: 3.5',

Diff for: sonar-project.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Required metadata
22
sonar.projectKey=glances
33
sonar.projectName=Glances
4-
sonar.projectVersion=2.7
4+
sonar.projectVersion=4.0
55

66
# Path to the parent source code directory.
77
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.

Diff for: tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# tox
66

77
[tox]
8-
envlist = py27, py38, py39
8+
envlist = py39
99

1010
[testenv]
1111
deps =

0 commit comments

Comments
 (0)