Hello community, here is the log from the commit of package python3-psutil for openSUSE:Factory checked in at 2015-06-23 11:57:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-psutil (Old) and /work/SRC/openSUSE:Factory/.python3-psutil.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-psutil" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-psutil/python3-psutil.changes 2015-06-18 06:37:34.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python3-psutil.new/python3-psutil.changes 2015-06-23 11:57:53.000000000 +0200 @@ -1,0 +2,11 @@ +Fri Jun 19 01:43:58 UTC 2015 - a...@gmx.de + +- update to version 3.0.1: + * #632: [Linux] better error message if cannot parse process UNIX + connections. + * #634: [Linux] Proces.cmdline() does not include empty string + arguments. + * #635: [UNIX] crash on module import if 'enum' package is installed + on python < 3.4. + +------------------------------------------------------------------- Old: ---- psutil-3.0.0.tar.gz New: ---- psutil-3.0.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-psutil.spec ++++++ --- /var/tmp/diff_new_pack.Pg2Zya/_old 2015-06-23 11:57:53.000000000 +0200 +++ /var/tmp/diff_new_pack.Pg2Zya/_new 2015-06-23 11:57:53.000000000 +0200 @@ -17,7 +17,7 @@ Name: python3-psutil -Version: 3.0.0 +Version: 3.0.1 Release: 0 Summary: A process utilities module for Python License: BSD-3-Clause ++++++ psutil-3.0.0.tar.gz -> psutil-3.0.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psutil-3.0.0/CREDITS new/psutil-3.0.1/CREDITS --- old/psutil-3.0.0/CREDITS 2015-06-12 10:27:43.000000000 +0200 +++ new/psutil-3.0.1/CREDITS 2015-06-18 03:47:43.000000000 +0200 @@ -303,3 +303,8 @@ W: http://www.johnburnett.com/ C: Irvine, CA, US I: 614 + +N: Árni Már Jónsson +E: Reykjavik, Iceland +E: https://github.com/arnimarj +I: 634 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psutil-3.0.0/HISTORY.rst new/psutil-3.0.1/HISTORY.rst --- old/psutil-3.0.0/HISTORY.rst 2015-06-12 10:27:43.000000000 +0200 +++ new/psutil-3.0.1/HISTORY.rst 2015-06-18 04:32:56.000000000 +0200 @@ -1,6 +1,17 @@ Bug tracker at https://github.com/giampaolo/psutil/issues -3.0.0 - XXXX-XX-XX +3.0.1 - 2015-06-18 +================== + +**Bug fixes** + +- #632: [Linux] better error message if cannot parse process UNIX connections. +- #634: [Linux] Proces.cmdline() does not include empty string arguments. +- #635: [UNIX] crash on module import if 'enum' package is installed on python + < 3.4. + + +3.0.0 - 2015-06-13 ================== **Enhancements** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psutil-3.0.0/Makefile new/psutil-3.0.1/Makefile --- old/psutil-3.0.0/Makefile 2015-06-12 10:28:29.000000000 +0200 +++ new/psutil-3.0.1/Makefile 2015-06-18 03:40:27.000000000 +0200 @@ -36,10 +36,28 @@ @# this directory. $(PYTHON) setup.py build_ext -i +# useful deps which are nice to have while developing / testing install-dev-deps: + python -c "import urllib2; \ + r = urllib2.urlopen('https://bootstrap.pypa.io/get-pip.py'); \ + open('/tmp/get-pip.py', 'w').write(r.read());" + $(PYTHON) /tmp/get-pip.py --user + rm /tmp/get-pip.py $(PYTHON) -m pip install --user --upgrade pip $(PYTHON) -m pip install --user --upgrade \ - ipaddress unittest2 mock ipdb coverage nose + # mandatory for unittests + ipaddress \ + mock \ + unittest2 \ + # nice to have + coverage \ + flake8 \ + ipdb \ + nose \ + pep8 \ + pyflakes \ + sphinx \ + sphinx-pypi-upload \ install: build $(PYTHON) setup.py install --user; \ @@ -65,7 +83,7 @@ test-by-name: install @$(PYTHON) -m nose test/test_psutil.py --nocapture -v -m $(filter-out $@,$(MAKECMDGOALS)) -# same as above but for test_memory_leaks.py script +# Same as above but for test_memory_leaks.py script. test-memleaks-by-name: install @$(PYTHON) -m nose test/test_memory_leaks.py --nocapture -v -m $(filter-out $@,$(MAKECMDGOALS)) @@ -77,16 +95,13 @@ $(PYTHON) -m coverage html $(COVERAGE_OPTS) $(PYTHON) -m webbrowser -t htmlcov/index.html -# requires "pip install pep8" pep8: @git ls-files | grep \\.py$ | xargs $(PYTHON) -m pep8 -# requires "pip install pyflakes" pyflakes: @export PYFLAKES_NODOCTEST=1 && \ git ls-files | grep \\.py$ | xargs $(PYTHON) -m pyflakes -# requires "pip install flake8" flake8: @git ls-files | grep \\.py$ | xargs $(PYTHON) -m flake8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psutil-3.0.0/PKG-INFO new/psutil-3.0.1/PKG-INFO --- old/psutil-3.0.0/PKG-INFO 2015-06-13 21:14:37.000000000 +0200 +++ new/psutil-3.0.1/PKG-INFO 2015-06-18 04:33:45.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: psutil -Version: 3.0.0 +Version: 3.0.1 Summary: psutil is a cross-platform library for retrieving information onrunning processes and system utilization (CPU, memory, disks, network)in Python. Home-page: https://github.com/giampaolo/psutil Author: Giampaolo Rodola @@ -46,7 +46,7 @@ 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, OSX, FreeBSD** and **Sun Solaris**, both **32-bit** and - **64-bit** architectures, with Python versions from **2.6 to 3.4** (users of + **64-bit** architectures, with Python versions from **2.6 to 3.5** (users of Python 2.4 and 2.5 may use `2.1.3 <https://pypi.python.org/pypi?name=psutil&version=2.1.3&:action=files>`__ version). `PyPy <http://pypy.org/>`__ is also known to work. @@ -341,6 +341,7 @@ Timeline ======== + - 2015-06-18: `psutil-3.0.1.tar.gz <https://pypi.python.org/packages/source/p/psutil/psutil-3.0.1.tar.gz>`_ - 2015-06-13: `psutil-3.0.0.tar.gz <https://pypi.python.org/packages/source/p/psutil/psutil-3.0.0.tar.gz>`_ - 2015-02-02: `psutil-2.2.1.tar.gz <https://pypi.python.org/packages/source/p/psutil/psutil-2.2.1.tar.gz>`_ - 2015-01-06: `psutil-2.2.0.tar.gz <https://pypi.python.org/packages/source/p/psutil/psutil-2.2.0.tar.gz>`_ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psutil-3.0.0/README.rst new/psutil-3.0.1/README.rst --- old/psutil-3.0.0/README.rst 2015-06-13 21:07:47.000000000 +0200 +++ new/psutil-3.0.1/README.rst 2015-06-18 04:33:25.000000000 +0200 @@ -38,7 +38,7 @@ 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, OSX, FreeBSD** and **Sun Solaris**, both **32-bit** and -**64-bit** architectures, with Python versions from **2.6 to 3.4** (users of +**64-bit** architectures, with Python versions from **2.6 to 3.5** (users of Python 2.4 and 2.5 may use `2.1.3 <https://pypi.python.org/pypi?name=psutil&version=2.1.3&:action=files>`__ version). `PyPy <http://pypy.org/>`__ is also known to work. @@ -333,6 +333,7 @@ Timeline ======== +- 2015-06-18: `psutil-3.0.1.tar.gz <https://pypi.python.org/packages/source/p/psutil/psutil-3.0.1.tar.gz>`_ - 2015-06-13: `psutil-3.0.0.tar.gz <https://pypi.python.org/packages/source/p/psutil/psutil-3.0.0.tar.gz>`_ - 2015-02-02: `psutil-2.2.1.tar.gz <https://pypi.python.org/packages/source/p/psutil/psutil-2.2.1.tar.gz>`_ - 2015-01-06: `psutil-2.2.0.tar.gz <https://pypi.python.org/packages/source/p/psutil/psutil-2.2.0.tar.gz>`_ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psutil-3.0.0/psutil/__init__.py new/psutil-3.0.1/psutil/__init__.py --- old/psutil-3.0.0/psutil/__init__.py 2015-06-04 03:59:23.000000000 +0200 +++ new/psutil-3.0.1/psutil/__init__.py 2015-06-18 04:32:32.000000000 +0200 @@ -158,7 +158,7 @@ ] __all__.extend(_psplatform.__extra__all__) __author__ = "Giampaolo Rodola'" -__version__ = "3.0.0" +__version__ = "3.0.1" version_info = tuple([int(num) for num in __version__.split('.')]) AF_LINK = _psplatform.AF_LINK _TOTAL_PHYMEM = None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psutil-3.0.0/psutil/_common.py new/psutil-3.0.1/psutil/_common.py --- old/psutil-3.0.0/psutil/_common.py 2015-06-04 03:59:23.000000000 +0200 +++ new/psutil-3.0.1/psutil/_common.py 2015-06-18 03:36:01.000000000 +0200 @@ -12,17 +12,19 @@ import os import socket import stat +import sys +from collections import namedtuple +from socket import AF_INET, SOCK_STREAM, SOCK_DGRAM try: import threading except ImportError: import dummy_threading as threading -try: - import enum # py >= 3.4 -except ImportError: + +if sys.version_info >= (3, 4): + import enum +else: enum = None -from collections import namedtuple -from socket import AF_INET, SOCK_STREAM, SOCK_DGRAM # --- constants diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psutil-3.0.0/psutil/_pslinux.py new/psutil-3.0.1/psutil/_pslinux.py --- old/psutil-3.0.0/psutil/_pslinux.py 2015-06-04 03:59:23.000000000 +0200 +++ new/psutil-3.0.1/psutil/_pslinux.py 2015-06-18 03:45:38.000000000 +0200 @@ -466,8 +466,13 @@ with open(file, 'rt') as f: f.readline() # skip the first line for line in f: - _, laddr, raddr, status, _, _, _, _, _, inode = \ - line.split()[:10] + try: + _, laddr, raddr, status, _, _, _, _, _, inode = \ + line.split()[:10] + except ValueError: + raise RuntimeError( + "error while parsing %s; malformed line %r" % ( + file, line)) if inode in inodes: # # We assume inet sockets are unique, so we error # # out if there are multiple references to the @@ -495,7 +500,12 @@ f.readline() # skip the first line for line in f: tokens = line.split() - _, _, _, _, type_, _, inode = tokens[0:7] + try: + _, _, _, _, type_, _, inode = tokens[0:7] + except ValueError: + raise RuntimeError( + "error while parsing %s; malformed line %r" % ( + file, line)) if inode in inodes: # With UNIX sockets we can have a single inode # referencing many file descriptors. @@ -765,7 +775,7 @@ fname = "/proc/%s/cmdline" % self.pid kw = dict(encoding=DEFAULT_ENCODING) if PY3 else dict() with open(fname, "rt", **kw) as f: - return [x for x in f.read().split('\x00') if x] + return [x for x in f.read()[:-1].split('\x00')] @wrap_exceptions def terminal(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psutil-3.0.0/psutil/_psutil_windows.c new/psutil-3.0.1/psutil/_psutil_windows.c --- old/psutil-3.0.0/psutil/_psutil_windows.c 2015-06-13 21:04:50.000000000 +0200 +++ new/psutil-3.0.1/psutil/_psutil_windows.c 2015-06-18 02:32:59.000000000 +0200 @@ -2691,6 +2691,19 @@ } +/* + * Get various process information by using NtQuerySystemInformation. + * We use this as a fallback when faster functions fail with access + * denied. This is slower because it iterates over all processes. + * Returned tuple includes the following process info: + * + * - num_threads + * - ctx_switches + * - num_handles (fallback) + * - user/kernel times (fallback) + * - create time (fallback) + * - io counters (fallback) + */ static PyObject * psutil_proc_info(PyObject *self, PyObject *args) { @@ -3395,4 +3408,4 @@ #if PY_MAJOR_VERSION >= 3 return module; #endif -} \ No newline at end of file +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psutil-3.0.0/psutil/arch/windows/process_info.c new/psutil-3.0.1/psutil/arch/windows/process_info.c --- old/psutil-3.0.0/psutil/arch/windows/process_info.c 2015-06-04 03:59:23.000000000 +0200 +++ new/psutil-3.0.1/psutil/arch/windows/process_info.c 2015-06-18 02:32:59.000000000 +0200 @@ -357,7 +357,10 @@ /* * Given a process PID and a PSYSTEM_PROCESS_INFORMATION structure - * fills the structure with process information. + * fills the structure with various process information by using + * NtQuerySystemInformation. + * We use this as a fallback when faster functions fail with access + * denied. This is slower because it iterates over all processes. * On success return 1, else 0 with Python exception already set. */ int diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psutil-3.0.0/psutil.egg-info/PKG-INFO new/psutil-3.0.1/psutil.egg-info/PKG-INFO --- old/psutil-3.0.0/psutil.egg-info/PKG-INFO 2015-06-13 21:14:37.000000000 +0200 +++ new/psutil-3.0.1/psutil.egg-info/PKG-INFO 2015-06-18 04:33:44.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: psutil -Version: 3.0.0 +Version: 3.0.1 Summary: psutil is a cross-platform library for retrieving information onrunning processes and system utilization (CPU, memory, disks, network)in Python. Home-page: https://github.com/giampaolo/psutil Author: Giampaolo Rodola @@ -46,7 +46,7 @@ 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, OSX, FreeBSD** and **Sun Solaris**, both **32-bit** and - **64-bit** architectures, with Python versions from **2.6 to 3.4** (users of + **64-bit** architectures, with Python versions from **2.6 to 3.5** (users of Python 2.4 and 2.5 may use `2.1.3 <https://pypi.python.org/pypi?name=psutil&version=2.1.3&:action=files>`__ version). `PyPy <http://pypy.org/>`__ is also known to work. @@ -341,6 +341,7 @@ Timeline ======== + - 2015-06-18: `psutil-3.0.1.tar.gz <https://pypi.python.org/packages/source/p/psutil/psutil-3.0.1.tar.gz>`_ - 2015-06-13: `psutil-3.0.0.tar.gz <https://pypi.python.org/packages/source/p/psutil/psutil-3.0.0.tar.gz>`_ - 2015-02-02: `psutil-2.2.1.tar.gz <https://pypi.python.org/packages/source/p/psutil/psutil-2.2.1.tar.gz>`_ - 2015-01-06: `psutil-2.2.0.tar.gz <https://pypi.python.org/packages/source/p/psutil/psutil-2.2.0.tar.gz>`_ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psutil-3.0.0/test/test_psutil.py new/psutil-3.0.1/test/test_psutil.py --- old/psutil-3.0.0/test/test_psutil.py 2015-06-13 21:04:50.000000000 +0200 +++ new/psutil-3.0.1/test/test_psutil.py 2015-06-18 03:49:40.000000000 +0200 @@ -1558,11 +1558,15 @@ with open(c_file, "w") as f: f.write("void main() { pause(); }") subprocess.check_call(["gcc", c_file, "-o", funky_name]) - sproc = get_test_subprocess([funky_name, "arg1", "arg2"]) + sproc = get_test_subprocess( + [funky_name, "arg1", "arg2", "", "arg3", ""]) p = psutil.Process(sproc.pid) + # ...in order to try to prevent occasional failures on travis + wait_for_pid(p.pid) self.assertEqual(p.name(), "foo bar )") self.assertEqual(p.exe(), "/tmp/foo bar )") - self.assertEqual(p.cmdline(), ["/tmp/foo bar )", "arg1", "arg2"]) + self.assertEqual( + p.cmdline(), ["/tmp/foo bar )", "arg1", "arg2", "", "arg3", ""]) @unittest.skipUnless(POSIX, 'posix only') def test_uids(self):