diff options
author | Matthieu Darbois <mayeut@users.noreply.github.com> | 2022-04-15 14:08:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-15 14:08:58 +0200 |
commit | 0f996734bdbd413f7dd8ce88d0c12227045609d1 (patch) | |
tree | f45f9b862a99de444ae1881de2003adc290a1c12 | |
parent | c45af430d3bfb6cbeed9b72c4865bc497fd006f1 (diff) | |
download | psutil-0f996734bdbd413f7dd8ce88d0c12227045609d1.tar.gz |
Drop Python 2.6 support (#2039)
Signed-off-by: mayeut <mayeut@users.noreply.github.com>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | README.rst | 2 | ||||
-rw-r--r-- | docs/index.rst | 4 | ||||
-rw-r--r-- | make.bat | 2 | ||||
-rw-r--r-- | psutil/_common.py | 5 | ||||
-rwxr-xr-x | psutil/tests/test_process.py | 2 | ||||
-rwxr-xr-x | psutil/tests/test_windows.py | 2 | ||||
-rwxr-xr-x | scripts/internal/print_announce.py | 2 | ||||
-rwxr-xr-x | setup.py | 3 |
9 files changed, 9 insertions, 15 deletions
@@ -29,7 +29,7 @@ DEPS = \ PY2_DEPS = \ futures \ ipaddress \ - mock==1.0.1 \ + mock \ unittest2 DEPS += `$(PYTHON) -c \ "import sys; print('$(PY2_DEPS)' if sys.version_info[0] == 2 else '')"` @@ -94,7 +94,7 @@ psutil currently supports the following platforms: - **Sun Solaris** - **AIX** -Supported Python versions are **2.6**, **2.7**, **3.4+** and +Supported Python versions are **2.7**, **3.4+** and `PyPy <http://pypy.org/>`__. Funding diff --git a/docs/index.rst b/docs/index.rst index 82872a2b..7cf673ef 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -38,7 +38,7 @@ psutil currently supports the following platforms: - **Sun Solaris** - **AIX** -Supported Python versions are **2.6**, **2.7** and **3.4+**. +Supported Python versions are **2.7** and **3.4+**. `PyPy <http://pypy.org/>`__ is also known to work. The psutil documentation you're reading is distributed as a single HTML page. @@ -2609,7 +2609,7 @@ Platforms support history * psutil 0.1.1 (2009-03): **FreeBSD** * psutil 0.1.0 (2009-01): **Linux, Windows, macOS** -Supported Python versions are 2.6, 2.7, 3.4+ and PyPy3. +Supported Python versions are 2.7, 3.4+ and PyPy3. Timeline ======== @@ -7,7 +7,7 @@ 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 +rem - Visual studio 2008 for Python 2.7 rem - Visual studio 2010 for Python 3.4+ rem ...therefore it might not work on your Windows installation. rem diff --git a/psutil/_common.py b/psutil/_common.py index ef3e8664..9937eb83 100644 --- a/psutil/_common.py +++ b/psutil/_common.py @@ -281,10 +281,7 @@ class Error(Exception): __module__ = 'psutil' def _infodict(self, attrs): - try: - info = collections.OrderedDict() - except AttributeError: # pragma: no cover - info = {} # Python 2.6 + info = collections.OrderedDict() for name in attrs: value = getattr(self, name, None) if value: diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py index 181097e3..ef96e797 100755 --- a/psutil/tests/test_process.py +++ b/psutil/tests/test_process.py @@ -1574,7 +1574,7 @@ class TestPopen(PsutilTestCase): self.assertRaises(psutil.NoSuchProcess, proc.kill) self.assertRaises(psutil.NoSuchProcess, proc.send_signal, signal.SIGTERM) - if WINDOWS and sys.version_info >= (2, 7): + if WINDOWS: self.assertRaises(psutil.NoSuchProcess, proc.send_signal, signal.CTRL_C_EVENT) self.assertRaises(psutil.NoSuchProcess, proc.send_signal, diff --git a/psutil/tests/test_windows.py b/psutil/tests/test_windows.py index 7a843bc3..0333dbe5 100755 --- a/psutil/tests/test_windows.py +++ b/psutil/tests/test_windows.py @@ -338,8 +338,6 @@ class TestProcess(WindowsTestCase): win32api.CloseHandle(handle) self.assertEqual(p.num_handles(), before) - @unittest.skipIf(not sys.version_info >= (2, 7), - "CTRL_* signals not supported") def test_ctrl_signals(self): p = psutil.Process(self.spawn_testproc().pid) p.send_signal(signal.CTRL_C_EVENT) diff --git a/scripts/internal/print_announce.py b/scripts/internal/print_announce.py index c9948c1d..1c22b1c1 100755 --- a/scripts/internal/print_announce.py +++ b/scripts/internal/print_announce.py @@ -47,7 +47,7 @@ line tools such as: ps, top, lsof, netstat, ifconfig, who, df, kill, free, \ nice, ionice, iostat, iotop, uptime, pidof, tty, taskset, pmap. It \ currently supports Linux, Windows, macOS, Sun Solaris, FreeBSD, OpenBSD, \ NetBSD and AIX, both 32-bit and 64-bit architectures. Supported Python \ -versions are 2.6, 2.7 and 3.4+. PyPy is also known to work. +versions are 2.7 and 3.4+. PyPy is also known to work. What's new ========== @@ -392,7 +392,6 @@ def main(): 'Operating System :: POSIX', 'Programming Language :: C', 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: Implementation :: CPython', @@ -414,7 +413,7 @@ def main(): ) if setuptools is not None: kwargs.update( - python_requires=">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", + python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", extras_require=extras_require, zip_safe=False, ) |