Skip to content

Commit

Permalink
Merge remote-tracking branch 'giampaolo/master'
Browse files Browse the repository at this point in the history
* giampaolo/master: (33 commits)
  fix appveyor failure
  update TODO + GIT pre-commit script
  #678_ setup.py error on linux
  reverse change - don't call safe_remove on APPVEYOR
  fix review comments
  update history and credits
  giampaolo#517 The data type retrurned from kstat is interface dependent and not system dependent
  Fix giampaolo#517 by testing ksp->ks_name is a network interface instead of testing ksp->ks_module is 'link'
  avoid name cutoff in tests
  use os.path.normcase for Windows exe tests
  TestUnicode: Instead of using Python's executable, compile one if possible
  Fix test_memory_leaks
  Code review fixes
  fix test on Solaris
  fix test on Solaris
  fix test on Solaris
  fix test on Solaris
  swap -k is not supported in Solaris 10
  Add ifaddrs.c for Solaris 10
  move DUPLEX_UNKOWN fix outside of #if PSUTIL_HAVE_IOPRIO
  ...
  • Loading branch information
mrjefftang committed Sep 8, 2015
2 parents dcb92cd + 343a8f2 commit bf07eeb
Show file tree
Hide file tree
Showing 36 changed files with 904 additions and 686 deletions.
2 changes: 1 addition & 1 deletion .git-pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def main():
# flake8
failed = False
for path in files:
ret = subprocess.call("flake8 %s" % path, shell=True)
ret = subprocess.call("python -m flake8 %s" % path, shell=True)
if ret != 0:
failed = True
if failed:
Expand Down
4 changes: 4 additions & 0 deletions CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -325,3 +325,7 @@ I: 670
N: maozguttman
W: https://github.com/maozguttman
I: 659

N: wiggin15
W: https://github.com/wiggin15
I: 517, 607, 610
19 changes: 19 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
Bug tracker at https://github.com/giampaolo/psutil/issues

3.2.2 - XXXX-XX-XX
==================

**Bug fixes**

- #517: [SunOS] net_io_counters failed to detect network interfaces
correctly on Solaris 10
- #610: [SunOS] fix build and tests on Solaris 10
- #678: [Linux] can't install psutil due to bug in setup.py.


3.2.1 - 2015-09-03
==================

**Bug fixes**

- #677: [Linux] can't install psutil due to bug in setup.py.


3.2.0 - 2015-09-02
==================

Expand Down
3 changes: 2 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,8 @@ http://groups.google.com/group/psutil/
Timeline
========
- 2015-09-02: `psutil-3.1.1.tar.gz <https://pypi.python.org/packages/source/p/psutil/psutil-3.2.0.tar.gz>`_
- 2015-09-03: `psutil-3.2.1.tar.gz <https://pypi.python.org/packages/source/p/psutil/psutil-3.2.1.tar.gz>`_
- 2015-09-02: `psutil-3.2.0.tar.gz <https://pypi.python.org/packages/source/p/psutil/psutil-3.2.0.tar.gz>`_
- 2015-07-15: `psutil-3.1.1.tar.gz <https://pypi.python.org/packages/source/p/psutil/psutil-3.1.1.tar.gz>`_
- 2015-07-15: `psutil-3.1.0.tar.gz <https://pypi.python.org/packages/source/p/psutil/psutil-3.1.0.tar.gz>`_
- 2015-06-18: `psutil-3.0.1.tar.gz <https://pypi.python.org/packages/source/p/psutil/psutil-3.0.1.tar.gz>`_
Expand Down
28 changes: 16 additions & 12 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,25 @@ A collection of ideas and notes about stuff to implement in future versions.
https://github.com/giampaolo/psutil/issues


PLATFORMS
=========

* #615 (PR): OpenBSD

* #355 (patch): Android

* #429 (patch): NetBSD

* #605 (branch): AIX

* #276: GNU/Hurd

* DragonFlyBSD


HIGHER PRIORITY
===============

* OpenBSD support.

* #371: CPU temperature (apparently OSX and Linux only; on Linux it requires
lm-sensors lib).

Expand All @@ -36,16 +50,6 @@ HIGHER PRIORITY
LOWER PRIORITY
==============

* #355: Android support.

* #276: GNU/Hurd support.

* #429: NetBSD support.

* DragonFlyBSD support?

* AIX support?

* examples/taskmgr-gui.py (using tk).

* system-wide number of open file descriptors:
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ Process class
`signal module <http://docs.python.org//library/signal.html>`__
constants) pre-emptively checking whether PID has been reused.
On UNIX this is the same as ``os.kill(pid, sig)``.
On Windows only **SIGTERM**, **CTRL_C_EVENT ** and **CTRL_BREAK_EVENT**
On Windows only **SIGTERM**, **CTRL_C_EVENT** and **CTRL_BREAK_EVENT**
signals are supported and **SIGTERM** is treated as an alias for
:meth:`kill()`.

Expand Down
1 change: 1 addition & 0 deletions make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ if "%1" == "clean" (
for /r %%R in (__pycache__) do if exist %%R (rmdir /S /Q %%R)
for /r %%R in (*.pyc) do if exist %%R (del /s %%R)
for /r %%R in (*.pyd) do if exist %%R (del /s %%R)
for /r %%R in (*.obj) do if exist %%R (del /s %%R)
for /r %%R in (*.orig) do if exist %%R (del /s %%R)
for /r %%R in (*.bak) do if exist %%R (del /s %%R)
for /r %%R in (*.rej) do if exist %%R (del /s %%R)
Expand Down
3 changes: 1 addition & 2 deletions psutil/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
Expand Down Expand Up @@ -158,7 +157,7 @@
]
__all__.extend(_psplatform.__extra__all__)
__author__ = "Giampaolo Rodola'"
__version__ = "3.2.0"
__version__ = "3.2.2"
version_info = tuple([int(num) for num in __version__.split('.')])
AF_LINK = _psplatform.AF_LINK
_TOTAL_PHYMEM = None
Expand Down
2 changes: 0 additions & 2 deletions psutil/_compat.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Expand Down
2 changes: 0 additions & 2 deletions psutil/_psbsd.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Expand Down
2 changes: 0 additions & 2 deletions psutil/_pslinux.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Expand Down
2 changes: 0 additions & 2 deletions psutil/_psosx.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Expand Down
2 changes: 0 additions & 2 deletions psutil/_psposix.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Expand Down
12 changes: 4 additions & 8 deletions psutil/_pssunos.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Expand Down Expand Up @@ -97,13 +95,13 @@ def swap_memory():
# ...nevertheless I can't manage to obtain the same numbers as 'swap'
# cmdline utility, so let's parse its output (sigh!)
p = subprocess.Popen(['/usr/bin/env', 'PATH=/usr/sbin:/sbin:%s' %
os.environ['PATH'], 'swap', '-l', '-k'],
os.environ['PATH'], 'swap', '-l'],
stdout=subprocess.PIPE)
stdout, stderr = p.communicate()
if PY3:
stdout = stdout.decode(sys.stdout.encoding)
if p.returncode != 0:
raise RuntimeError("'swap -l -k' failed (retcode=%s)" % p.returncode)
raise RuntimeError("'swap -l' failed (retcode=%s)" % p.returncode)

lines = stdout.strip().split('\n')[1:]
if not lines:
Expand All @@ -112,10 +110,8 @@ def swap_memory():
for line in lines:
line = line.split()
t, f = line[-2:]
t = t.replace('K', '')
f = f.replace('K', '')
total += int(int(t) * 1024)
free += int(int(f) * 1024)
total += int(int(t) * 512)
free += int(int(f) * 512)
used = total - free
percent = usage_percent(used, total, _round=1)
return _common.sswap(total, used, free, percent,
Expand Down
Loading

0 comments on commit bf07eeb

Please sign in to comment.