Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Python 2.6 support #2039

Merged
merged 1 commit into from
Apr 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,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 '')"`
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
========
Expand Down
2 changes: 1 addition & 1 deletion make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions psutil/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion psutil/tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,7 @@ def test_kill_terminate(self):
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,
Expand Down
2 changes: 0 additions & 2 deletions psutil/tests/test_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,6 @@ def test_num_handles_increment(self):
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)
Expand Down
2 changes: 1 addition & 1 deletion scripts/internal/print_announce.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
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
==========
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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,
)
Expand Down