diff options
-rw-r--r-- | HISTORY.rst | 2 | ||||
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | docs/index.rst | 95 | ||||
-rw-r--r-- | psutil/_pslinux.py | 13 | ||||
-rwxr-xr-x | psutil/tests/test_linux.py | 13 |
5 files changed, 63 insertions, 61 deletions
diff --git a/HISTORY.rst b/HISTORY.rst index 29654d82..428b9074 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,7 +3,7 @@ 4.4.1 ===== -*XXXX-XX-XX* +*2016-10-25* Bug fixes --------- @@ -225,7 +225,6 @@ release: ${MAKE} pre-release $(PYTHON) -m twine upload dist/* # upload tar.gz, exes, wheels on PYPI ${MAKE} git-tag-release - ${MAKE} upload-doc # Print announce of new release. print-announce: diff --git a/docs/index.rst b/docs/index.rst index ecf43f8b..5a0a6139 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1829,51 +1829,50 @@ take a look at the Timeline ======== -Also see `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst>`__. - -- 2016-10-23: `psutil-4.4.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=4.4.0&:action=files>`__ -- 2016-09-01: `psutil-4.3.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=4.3.1&:action=files>`__ -- 2016-06-18: `psutil-4.3.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=4.3.0&:action=files>`__ -- 2016-05-15: `psutil-4.2.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=4.2.0&:action=files>`__ -- 2016-03-12: `psutil-4.1.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=4.1.0&:action=files>`__ -- 2016-02-17: `psutil-4.0.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=4.0.0&:action=files>`__ -- 2016-01-20: `psutil-3.4.2.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.4.2&:action=files>`__ -- 2016-01-15: `psutil-3.4.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.4.1&:action=files>`__ -- 2015-11-25: `psutil-3.3.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.3.0&:action=files>`__ -- 2015-10-04: `psutil-3.2.2.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.2.2&:action=files>`__ -- 2015-09-03: `psutil-3.2.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.2.1&:action=files>`__ -- 2015-09-02: `psutil-3.2.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.2.0&:action=files>`__ -- 2015-07-15: `psutil-3.1.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.1.1&:action=files>`__ -- 2015-07-15: `psutil-3.1.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.1.0&:action=files>`__ -- 2015-06-18: `psutil-3.0.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.0.1&:action=files>`__ -- 2015-06-13: `psutil-3.0.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.0.0&:action=files>`__ -- 2015-02-02: `psutil-2.2.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=2.2.1&:action=files>`__ -- 2015-01-06: `psutil-2.2.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=2.2.0&:action=files>`__ -- 2014-09-26: `psutil-2.1.3.tar.gz <https://pypi.python.org/pypi?name=psutil&version=2.1.3&:action=files>`__ -- 2014-09-21: `psutil-2.1.2.tar.gz <https://pypi.python.org/pypi?name=psutil&version=2.1.2&:action=files>`__ -- 2014-04-30: `psutil-2.1.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=2.1.1&:action=files>`__ -- 2014-04-08: `psutil-2.1.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=2.1.0&:action=files>`__ -- 2014-03-10: `psutil-2.0.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=2.0.0&:action=files>`__ -- 2013-11-25: `psutil-1.2.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=1.2.1&:action=files>`__ -- 2013-11-20: `psutil-1.2.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=1.2.0&:action=files>`__ -- 2013-11-07: `psutil-1.1.3.tar.gz <https://pypi.python.org/pypi?name=psutil&version=1.1.3&:action=files>`__ -- 2013-10-22: `psutil-1.1.2.tar.gz <https://pypi.python.org/pypi?name=psutil&version=1.1.2&:action=files>`__ -- 2013-10-08: `psutil-1.1.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=1.1.1&:action=files>`__ -- 2013-09-28: `psutil-1.1.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=1.1.0&:action=files>`__ -- 2013-07-12: `psutil-1.0.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=1.0.1&:action=files>`__ -- 2013-07-10: `psutil-1.0.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=1.0.0&:action=files>`__ -- 2013-05-03: `psutil-0.7.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.7.1&:action=files>`__ -- 2013-04-12: `psutil-0.7.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.7.0&:action=files>`__ -- 2012-08-16: `psutil-0.6.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.6.1&:action=files>`__ -- 2012-08-13: `psutil-0.6.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.6.0&:action=files>`__ -- 2012-06-29: `psutil-0.5.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.5.1&:action=files>`__ -- 2012-06-27: `psutil-0.5.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.5.0&:action=files>`__ -- 2011-12-14: `psutil-0.4.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.4.1&:action=files>`__ -- 2011-10-29: `psutil-0.4.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.4.0&:action=files>`__ -- 2011-07-08: `psutil-0.3.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.3.0&:action=files>`__ -- 2011-03-20: `psutil-0.2.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.2.1&:action=files>`__ -- 2010-11-13: `psutil-0.2.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.2.0&:action=files>`__ -- 2010-03-02: `psutil-0.1.3.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.1.3&:action=files>`__ -- 2009-05-06: `psutil-0.1.2.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.1.2&:action=files>`__ -- 2009-03-06: `psutil-0.1.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.1.1&:action=files>`__ -- 2009-01-27: `psutil-0.1.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.1.0&:action=files>`__ +- 2016-10-23: `psutil-4.4.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=4.4.1&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#441>`__ +- 2016-10-23: `psutil-4.4.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=4.4.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#440>`__ +- 2016-09-01: `psutil-4.3.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=4.3.1&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#431>`__ +- 2016-06-18: `psutil-4.3.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=4.3.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#430>`__ +- 2016-05-15: `psutil-4.2.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=4.2.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#420>`__ +- 2016-03-12: `psutil-4.1.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=4.1.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#410>`__ +- 2016-02-17: `psutil-4.0.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=4.0.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#400>`__ +- 2016-01-20: `psutil-3.4.2.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.4.2&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#342>`__ +- 2016-01-15: `psutil-3.4.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.4.1&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#341>`__ +- 2015-11-25: `psutil-3.3.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.3.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#330>`__ +- 2015-10-04: `psutil-3.2.2.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.2.2&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#322>`__ +- 2015-09-03: `psutil-3.2.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.2.1&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#321>`__ +- 2015-09-02: `psutil-3.2.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.2.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#320>`__ +- 2015-07-15: `psutil-3.1.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.1.1&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#311>`__ +- 2015-07-15: `psutil-3.1.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.1.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#310>`__ +- 2015-06-18: `psutil-3.0.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.0.1&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#301>`__ +- 2015-06-13: `psutil-3.0.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=3.0.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#300>`__ +- 2015-02-02: `psutil-2.2.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=2.2.1&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#221>`__ +- 2015-01-06: `psutil-2.2.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=2.2.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#220>`__ +- 2014-09-26: `psutil-2.1.3.tar.gz <https://pypi.python.org/pypi?name=psutil&version=2.1.3&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#213>`__ +- 2014-09-21: `psutil-2.1.2.tar.gz <https://pypi.python.org/pypi?name=psutil&version=2.1.2&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#212>`__ +- 2014-04-30: `psutil-2.1.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=2.1.1&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#211>`__ +- 2014-04-08: `psutil-2.1.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=2.1.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#210>`__ +- 2014-03-10: `psutil-2.0.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=2.0.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#200>`__ +- 2013-11-25: `psutil-1.2.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=1.2.1&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#121>`__ +- 2013-11-20: `psutil-1.2.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=1.2.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#120>`__ +- 2013-11-07: `psutil-1.1.3.tar.gz <https://pypi.python.org/pypi?name=psutil&version=1.1.3&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#113>`__ +- 2013-10-22: `psutil-1.1.2.tar.gz <https://pypi.python.org/pypi?name=psutil&version=1.1.2&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#112>`__ +- 2013-10-08: `psutil-1.1.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=1.1.1&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#111>`__ +- 2013-09-28: `psutil-1.1.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=1.1.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#110>`__ +- 2013-07-12: `psutil-1.0.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=1.0.1&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#101>`__ +- 2013-07-10: `psutil-1.0.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=1.0.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#100>`__ +- 2013-05-03: `psutil-0.7.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.7.1&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#071>`__ +- 2013-04-12: `psutil-0.7.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.7.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#070>`__ +- 2012-08-16: `psutil-0.6.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.6.1&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#061>`__ +- 2012-08-13: `psutil-0.6.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.6.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#060>`__ +- 2012-06-29: `psutil-0.5.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.5.1&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#051>`__ +- 2012-06-27: `psutil-0.5.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.5.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#050>`__ +- 2011-12-14: `psutil-0.4.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.4.1&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#041>`__ +- 2011-10-29: `psutil-0.4.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.4.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#040>`__ +- 2011-07-08: `psutil-0.3.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.3.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#030>`__ +- 2011-03-20: `psutil-0.2.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.2.1&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#021>`__ +- 2010-11-13: `psutil-0.2.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.2.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#020>`__ +- 2010-03-02: `psutil-0.1.3.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.1.3&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#013>`__ +- 2009-05-06: `psutil-0.1.2.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.1.2&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#012>`__ +- 2009-03-06: `psutil-0.1.1.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.1.1&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#011>`__ +- 2009-01-27: `psutil-0.1.0.tar.gz <https://pypi.python.org/pypi?name=psutil&version=0.1.0&:action=files>`__ - `what's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#010>`__ diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py index 51fafc5a..3732beaf 100644 --- a/psutil/_pslinux.py +++ b/psutil/_pslinux.py @@ -692,7 +692,8 @@ class Connections: raise return inodes - def decode_address(self, addr, family): + @staticmethod + def decode_address(addr, family): """Accept an "ip:port" address as displayed in /proc/net/* and convert it into a human readable form, like: @@ -746,7 +747,8 @@ class Connections: raise return (ip, port) - def process_inet(self, file, family, type_, inodes, filter_pid=None): + @staticmethod + def process_inet(file, family, type_, inodes, filter_pid=None): """Parse /proc/net/tcp* and /proc/net/udp* files.""" if file.endswith('6') and not os.path.exists(file): # IPv6 not supported @@ -779,13 +781,14 @@ class Connections: else: status = _common.CONN_NONE try: - laddr = self.decode_address(laddr, family) - raddr = self.decode_address(raddr, family) + laddr = Connections.decode_address(laddr, family) + raddr = Connections.decode_address(raddr, family) except _Ipv6UnsupportedError: continue yield (fd, family, type_, laddr, raddr, status, pid) - def process_unix(self, file, family, inodes, filter_pid=None): + @staticmethod + def process_unix(file, family, inodes, filter_pid=None): """Parse /proc/net/unix files.""" with open_text(file, buffering=BIGGER_FILE_BUFFERING) as f: f.readline() # skip the first line diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py index ae295be6..fe2f0810 100755 --- a/psutil/tests/test_linux.py +++ b/psutil/tests/test_linux.py @@ -268,7 +268,7 @@ class TestSystemVirtualMemory(unittest.TestCase): def test_avail_old_percent(self): # Make sure that our calculation of avail mem for old kernels - # is off by max 5%. + # is off by max 10%. from psutil._pslinux import calculate_avail_vmem from psutil._pslinux import open_binary @@ -282,7 +282,7 @@ class TestSystemVirtualMemory(unittest.TestCase): if b'MemAvailable:' in mems: b = mems[b'MemAvailable:'] diff_percent = abs(a - b) / a * 100 - self.assertLess(diff_percent, 5) + self.assertLess(diff_percent, 10) def test_avail_old_comes_from_kernel(self): # Make sure "MemAvailable:" coluimn is used instead of relying @@ -568,6 +568,7 @@ class TestSystemNetwork(unittest.TestCase): self.assertEqual(stats.mtu, int(re.findall('MTU:(\d+)', out)[0])) + @retry_before_failing() def test_net_io_counters(self): def ifconfig(nic): ret = {} @@ -588,13 +589,13 @@ class TestSystemNetwork(unittest.TestCase): except RuntimeError: continue self.assertAlmostEqual( - stats.bytes_recv, ifconfig_ret['bytes_recv'], delta=1024) + stats.bytes_recv, ifconfig_ret['bytes_recv'], delta=1024 * 5) self.assertAlmostEqual( - stats.bytes_sent, ifconfig_ret['bytes_sent'], delta=1024) + stats.bytes_sent, ifconfig_ret['bytes_sent'], delta=1024 * 5) self.assertAlmostEqual( - stats.packets_recv, ifconfig_ret['packets_recv'], delta=512) + stats.packets_recv, ifconfig_ret['packets_recv'], delta=1024) self.assertAlmostEqual( - stats.packets_sent, ifconfig_ret['packets_sent'], delta=512) + stats.packets_sent, ifconfig_ret['packets_sent'], delta=1024) self.assertAlmostEqual( stats.errin, ifconfig_ret['errin'], delta=10) self.assertAlmostEqual( |