diff --git a/NEWS b/NEWS index 99587432..6af598e2 100644 --- a/NEWS +++ b/NEWS @@ -26,8 +26,8 @@ Bugs corrected: Deprecated: - * Python 2.6 is no longer supported - * Monitoring process list module is replaced by AMP + * Drop Python 2.6 support (issue #300) + * Monitoring process list module is replaced by AMP (see issue #780) Version 2.6.1 ============= diff --git a/README.rst b/README.rst index 819e7b86..9f6b0e1f 100644 --- a/README.rst +++ b/README.rst @@ -30,7 +30,7 @@ written in Python. Requirements ============ -- ``python >= 2.6`` or ``>= 3.3`` (tested with version 2.6, 2.7, 3.3, 3.4, 3.5) +- ``python >= 2.7`` or ``>= 3.3`` (tested with version 2.7, 3.3, 3.4, 3.5) - ``psutil >= 2.0.0`` - ``setuptools`` @@ -54,6 +54,12 @@ Optional dependencies: - ``py-cpuinfo`` (for the Quicklook CPU info module) - ``scandir`` (for the Folders plugin) [Only for Python < 3.5] +Note for Python 2.6 users: + +Glances 2.7 (or higher) no longer support Python 2.6. Please upgrade to +Python 2.7/3.3+ or downgrade Glances to 2.6.2 (latest version with Python +2.6 support). + Installation ============ diff --git a/glances/__init__.py b/glances/__init__.py index ebcb1bba..ae28db50 100644 --- a/glances/__init__.py +++ b/glances/__init__.py @@ -2,7 +2,7 @@ # # This file is part of Glances. # -# Copyright (C) 2015 Nicolargo +# Copyright (C) 2016 Nicolargo # # Glances is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by @@ -49,16 +49,13 @@ except locale.Error: print("Warning: Unable to set locale. Expect encoding problems.") # Check Python version -if sys.version_info < (2, 6) or (3, 0) <= sys.version_info < (3, 3): - print('Glances requires at least Python 2.6 or 3.3 to run.') - sys.exit(1) - if sys.version_info[:2] == (2, 6): import warnings - warnings.warn('Python 2.6 support will be dropped. Please switch ' - 'to at least Python 2.7 or 3.3+ as soon as possible. ' - 'See http://www.snarky.ca/stop-using-python-2-6 ' - 'for more information.') + warnings.warn('Python 2.6 support is dropped. Please switch to at ' + 'least Python 2.7/3.3+ or downgrade to Glances 2.6.2.') +if sys.version_info < (2, 7) or (3, 0) <= sys.version_info < (3, 3): + print('Glances requires at least Python 2.7 or 3.3 to run.') + sys.exit(1) # Check PSutil version psutil_min_version = (2, 0, 0) diff --git a/glances/compat.py b/glances/compat.py index 396c840f..2936cd52 100644 --- a/glances/compat.py +++ b/glances/compat.py @@ -2,7 +2,7 @@ # # This file is part of Glances. # -# Copyright (C) 2015 Nicolargo +# Copyright (C) 2016 Nicolargo # # Glances is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by @@ -24,6 +24,7 @@ import operator import sys import unicodedata +from logging.config import dictConfig PY3 = sys.version_info[0] == 3 @@ -128,9 +129,3 @@ else: if isinstance(s, binary_type): return s return s.encode('utf-8', 'replace') - -try: - # Python 2.6 - from logutils.dictconfig import dictConfig -except ImportError: - from logging.config import dictConfig diff --git a/setup.py b/setup.py index 0f8a64e0..6c51ddbc 100755 --- a/setup.py +++ b/setup.py @@ -5,8 +5,8 @@ import sys from setuptools import setup, Command -if sys.version_info < (2, 6) or (3, 0) <= sys.version_info < (3, 3): - print('Glances requires at least Python 2.6 or 3.3 to run.') +if sys.version_info < (2, 7) or (3, 0) <= sys.version_info < (3, 3): + print('Glances requires at least Python 2.7 or 3.3 to run.') sys.exit(1) @@ -41,16 +41,15 @@ def get_data_files(): def get_requires(): requires = ['psutil>=2.0.0'] + if sys.platform.startswith('win'): requires += ['colorconsole'] - if sys.version_info[:2] == (2, 6): - requires += ['argparse', 'logutils'] return requires setup( name='Glances', - version='2.6.1', + version='2.7', description="A cross-platform curses-based monitoring tool", long_description=open('README.rst').read(), author='Nicolas Hennion', @@ -89,7 +88,6 @@ setup( 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3',