summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-03-04 09:44:10 -0800
committerGiampaolo Rodola <g.rodola@gmail.com>2018-03-04 09:44:10 -0800
commit74248cc706bdf01f80d1c704a094ff30974cfa93 (patch)
tree651a21809d13211d06d2e6862468b39e8e2ff786
parent63a672b29cb3e0279b371b3d5914f0109a07f071 (diff)
downloadpsutil-74248cc706bdf01f80d1c704a094ff30974cfa93.tar.gz
Remove additional workarounds and support for Python 3.2 & 3.3 (#1228)
Support for Python 3.3 was dropped in version 5.4.1. Support for Python 3.2 was dropped earlier. Remove all references to these unsupported versions including documentation, scripts, workarounds, etc. Eases maintenance as fewer workarounds are used for unsupported environments.
-rwxr-xr-x.ci/travis/install.sh12
-rw-r--r--INSTALL.rst2
-rw-r--r--make.bat4
-rw-r--r--psutil/__init__.py1
-rw-r--r--psutil/_compat.py10
-rwxr-xr-xpsutil/tests/__main__.py2
-rwxr-xr-xpsutil/tests/test_contracts.py1
-rwxr-xr-xpsutil/tests/test_posix.py1
-rwxr-xr-xpsutil/tests/test_windows.py1
-rw-r--r--tox.ini5
10 files changed, 5 insertions, 34 deletions
diff --git a/.ci/travis/install.sh b/.ci/travis/install.sh
index 677dc465..bb86700e 100755
--- a/.ci/travis/install.sh
+++ b/.ci/travis/install.sh
@@ -24,14 +24,6 @@ if [[ "$(uname -s)" == 'Darwin' ]]; then
pyenv install 2.7.10
pyenv virtualenv 2.7.10 psutil
;;
- # py32)
- # pyenv install 3.2.6
- # pyenv virtualenv 3.2.6 psutil
- # ;;
- # py33)
- # pyenv install 3.3.6
- # pyenv virtualenv 3.3.6 psutil
- # ;;
py34)
pyenv install 3.4.3
pyenv virtualenv 3.4.3 psutil
@@ -45,10 +37,6 @@ if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]] || [[ $PYVER == 'py26' ]]; then
pip install -U ipaddress unittest2 argparse mock==1.0.1
elif [[ $TRAVIS_PYTHON_VERSION == '2.7' ]] || [[ $PYVER == 'py27' ]]; then
pip install -U ipaddress mock
-elif [[ $TRAVIS_PYTHON_VERSION == '3.2' ]] || [[ $PYVER == 'py32' ]]; then
- pip install -U ipaddress mock
-elif [[ $TRAVIS_PYTHON_VERSION == '3.3' ]] || [[ $PYVER == 'py33' ]]; then
- pip install -U ipaddress
fi
pip install -U coverage coveralls flake8 pep8 setuptools
diff --git a/INSTALL.rst b/INSTALL.rst
index 8d54d6ae..9e5defb4 100644
--- a/INSTALL.rst
+++ b/INSTALL.rst
@@ -89,7 +89,7 @@ This `blog post <https://blog.ionelmc.ro/2014/12/21/compiling-python-extensions
provides numerous info on how to properly set up VS (good luck with that).
* Python 2.6, 2.7: `VS-2008 <http://www.microsoft.com/en-us/download/details.aspx?id=44266>`__
-* Python 3.3, 3.4: `VS-2010 <http://www.visualstudio.com/downloads/download-visual-studio-vs#d-2010-express>`__
+* Python 3.4: `VS-2010 <http://www.visualstudio.com/downloads/download-visual-studio-vs#d-2010-express>`__
* Python 3.5+: `VS-2015 <http://www.visualstudio.com/en-au/news/vs2015-preview-vs>`__
Compiling 64 bit versions of Python 2.6 and 2.7 with VS 2008 requires
diff --git a/make.bat b/make.bat
index cdabe3a6..c7c31902 100644
--- a/make.bat
+++ b/make.bat
@@ -7,8 +7,8 @@ rem psutil ("make.bat build", "make.bat install") and running tests
rem ("make.bat test").
rem
rem This script is modeled after my Windows installation which uses:
-rem - Visual studio 2008 for Python 2.6, 2.7, 3.2
-rem - Visual studio 2010 for Python 3.3+
+rem - Visual studio 2008 for Python 2.6, 2.7
+rem - Visual studio 2010 for Python 3.4+
rem ...therefore it might not work on your Windows installation.
rem
rem By default C:\Python27\python.exe is used.
diff --git a/psutil/__init__.py b/psutil/__init__.py
index 5e29a7fc..97767f11 100644
--- a/psutil/__init__.py
+++ b/psutil/__init__.py
@@ -43,7 +43,6 @@ from ._common import deprecated_method
from ._common import memoize
from ._common import memoize_when_activated
from ._common import wrap_numbers as _wrap_numbers
-from ._compat import callable
from ._compat import long
from ._compat import PY3 as _PY3
diff --git a/psutil/_compat.py b/psutil/_compat.py
index de91638f..08aefe4b 100644
--- a/psutil/_compat.py
+++ b/psutil/_compat.py
@@ -10,7 +10,7 @@ import os
import sys
__all__ = ["PY3", "long", "xrange", "unicode", "basestring", "u", "b",
- "callable", "lru_cache", "which"]
+ "lru_cache", "which"]
PY3 = sys.version_info[0] == 3
@@ -38,14 +38,6 @@ else:
return s
-# removed in 3.0, reintroduced in 3.2
-try:
- callable = callable
-except NameError:
- def callable(obj):
- return any("__call__" in klass.__dict__ for klass in type(obj).__mro__)
-
-
# --- stdlib additions
diff --git a/psutil/tests/__main__.py b/psutil/tests/__main__.py
index 2cdf5c42..62fe0742 100755
--- a/psutil/tests/__main__.py
+++ b/psutil/tests/__main__.py
@@ -32,8 +32,6 @@ if sys.version_info[:2] == (2, 6):
TEST_DEPS.extend(["ipaddress", "unittest2", "argparse", "mock==1.0.1"])
elif sys.version_info[:2] == (2, 7) or sys.version_info[:2] <= (3, 2):
TEST_DEPS.extend(["ipaddress", "mock"])
-elif sys.version_info[:2] == (3, 3):
- TEST_DEPS.extend(["ipaddress"])
def install_pip():
diff --git a/psutil/tests/test_contracts.py b/psutil/tests/test_contracts.py
index 855b53bf..0dfb3e2a 100755
--- a/psutil/tests/test_contracts.py
+++ b/psutil/tests/test_contracts.py
@@ -27,7 +27,6 @@ from psutil import OSX
from psutil import POSIX
from psutil import SUNOS
from psutil import WINDOWS
-from psutil._compat import callable
from psutil._compat import long
from psutil.tests import bind_unix_socket
from psutil.tests import check_connection_ntuple
diff --git a/psutil/tests/test_posix.py b/psutil/tests/test_posix.py
index c59f9a1c..e9a6f5f6 100755
--- a/psutil/tests/test_posix.py
+++ b/psutil/tests/test_posix.py
@@ -23,7 +23,6 @@ from psutil import OPENBSD
from psutil import OSX
from psutil import POSIX
from psutil import SUNOS
-from psutil._compat import callable
from psutil._compat import PY3
from psutil.tests import APPVEYOR
from psutil.tests import get_kernel_version
diff --git a/psutil/tests/test_windows.py b/psutil/tests/test_windows.py
index e4a719ea..32c46f67 100755
--- a/psutil/tests/test_windows.py
+++ b/psutil/tests/test_windows.py
@@ -21,7 +21,6 @@ import warnings
import psutil
from psutil import WINDOWS
-from psutil._compat import callable
from psutil.tests import APPVEYOR
from psutil.tests import get_test_subprocess
from psutil.tests import HAS_BATTERY
diff --git a/tox.ini b/tox.ini
index 3bee1d5a..305d81ce 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,7 +5,7 @@
# directory.
[tox]
-envlist = py26, py27, py33, py34, py35, py36
+envlist = py26, py27, py34, py35, py36
[testenv]
deps =
@@ -15,9 +15,6 @@ deps =
py26: unittest2
py27: ipaddress
py27: mock
- py32: ipaddress
- py32: mock
- py33: ipaddress
setenv =
PYTHONPATH = {toxinidir}/test