Hello community,

here is the log from the commit of package python-psutil for openSUSE:Factory 
checked in at 2019-12-07 15:17:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-psutil (Old)
 and      /work/SRC/openSUSE:Factory/.python-psutil.new.4691 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-psutil"

Sat Dec  7 15:17:56 2019 rev:52 rq:751674 version:5.6.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-psutil/python-psutil.changes      
2019-11-22 10:21:45.565331529 +0100
+++ /work/SRC/openSUSE:Factory/.python-psutil.new.4691/python-psutil.changes    
2019-12-07 15:21:44.203742525 +0100
@@ -1,0 +2,18 @@
+Thu Nov 28 17:10:26 UTC 2019 - Arun Persaud <a...@gmx.de>
+
+- update to version 5.6.7:
+  * Bug fixes
+    + 1630: [Windows] can't compile source distribution due to C
+      syntax error.
+
+- changes from version 5.6.6:
+  * Bug fixes
+    + 1179: [Linux] Process cmdline() now takes into account
+      misbehaving processes renaming the command line and using
+      inappropriate chars to separate args.
+    + 1616: use of Py_DECREF instead of Py_CLEAR will result in double
+      free and segfault (CVE). (patch by Riccardo Schirone)
+    + 1619: [OpenBSD] compilation fails due to C syntax error. (patch
+      by Nathan Houghton)
+
+-------------------------------------------------------------------

Old:
----
  psutil-5.6.5.tar.gz

New:
----
  psutil-5.6.7.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-psutil.spec ++++++
--- /var/tmp/diff_new_pack.xpp7tU/_old  2019-12-07 15:21:45.919742287 +0100
+++ /var/tmp/diff_new_pack.xpp7tU/_new  2019-12-07 15:21:45.923742287 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-psutil
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -23,7 +23,7 @@
 %bcond_with     test
 %endif
 Name:           python-psutil
-Version:        5.6.5
+Version:        5.6.7
 Release:        0
 Summary:        A process utilities module for Python
 License:        BSD-3-Clause

++++++ psutil-5.6.5.tar.gz -> psutil-5.6.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/CREDITS new/psutil-5.6.7/CREDITS
--- old/psutil-5.6.5/CREDITS    2019-11-04 08:57:31.000000000 +0100
+++ new/psutil-5.6.7/CREDITS    2019-11-13 14:58:32.000000000 +0100
@@ -638,3 +638,12 @@
 N: Bernát Gábor
 W: https://github.com/gaborbernat
 I: 1565
+
+N: Nathan Houghton
+W: https://github.com/n1000
+I: 1619
+
+N: Riccardo Schirone
+W: https://github.com/ret2libc
+C: Milano, Italy
+I: 1616
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/HISTORY.rst new/psutil-5.6.7/HISTORY.rst
--- old/psutil-5.6.5/HISTORY.rst        2019-11-06 09:51:03.000000000 +0100
+++ new/psutil-5.6.7/HISTORY.rst        2019-11-26 06:58:43.000000000 +0100
@@ -1,5 +1,29 @@
 *Bug tracker at https://github.com/giampaolo/psutil/issues*
 
+
+5.6.7
+=====
+
+2019-11-26
+
+**Bug fixes**
+
+- 1630_: [Windows] can't compile source distribution due to C syntax error.
+
+5.6.6
+=====
+
+2019-11-25
+
+**Bug fixes**
+
+- 1179_: [Linux] Process cmdline() now takes into account misbehaving processes
+  renaming the command line and using inappropriate chars to separate args.
+- 1616_: use of Py_DECREF instead of Py_CLEAR will result in double free and
+  segfault (CVE).  (patch by Riccardo Schirone)
+- 1619_: [OpenBSD] compilation fails due to C syntax error.  (patch by Nathan
+  Houghton)
+
 5.6.5
 =====
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/PKG-INFO new/psutil-5.6.7/PKG-INFO
--- old/psutil-5.6.5/PKG-INFO   2019-11-06 11:07:24.973878400 +0100
+++ new/psutil-5.6.7/PKG-INFO   2019-11-26 08:25:39.071056100 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: psutil
-Version: 5.6.5
+Version: 5.6.7
 Summary: Cross-platform lib for process and system monitoring in Python.
 Home-page: https://github.com/giampaolo/psutil
 Author: Giampaolo Rodola
@@ -127,8 +127,6 @@
                By subscribing you will help me (`Giampaolo Rodola`_) support 
psutil
                future development. Alternatively consider making a small 
`donation`_.
         
-        .. _Tidelift Subscription: 
https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=readme
-        
         Security
         ========
         
@@ -523,6 +521,8 @@
         .. _`Giampaolo Rodola`: http://grodola.blogspot.com/p/about.html
         .. _`donation`: 
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A9ZS7PKKRM3S8
         .. _Tidelift security contact: https://tidelift.com/security
+        .. _Tidelift Subscription: 
https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=readme
+        
         
 Keywords: 
ps,top,kill,free,lsof,netstat,nice,tty,ionice,uptime,taskmgr,process,df,iotop,iostat,ifconfig,taskset,who,pidof,pmap,smem,pstree,monitoring,ulimit,prlimit,smem,performance,metrics,agent,observability
 Platform: Platform Independent
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/README.rst new/psutil-5.6.7/README.rst
--- old/psutil-5.6.5/README.rst 2019-10-31 09:39:33.000000000 +0100
+++ new/psutil-5.6.7/README.rst 2019-11-26 07:23:37.000000000 +0100
@@ -119,8 +119,6 @@
        By subscribing you will help me (`Giampaolo Rodola`_) support psutil
        future development. Alternatively consider making a small `donation`_.
 
-.. _Tidelift Subscription: 
https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=readme
-
 Security
 ========
 
@@ -515,3 +513,5 @@
 .. _`Giampaolo Rodola`: http://grodola.blogspot.com/p/about.html
 .. _`donation`: 
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A9ZS7PKKRM3S8
 .. _Tidelift security contact: https://tidelift.com/security
+.. _Tidelift Subscription: 
https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=readme
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/docs/index.rst 
new/psutil-5.6.7/docs/index.rst
--- old/psutil-5.6.5/docs/index.rst     2019-11-06 09:51:47.000000000 +0100
+++ new/psutil-5.6.7/docs/index.rst     2019-11-26 08:24:03.000000000 +0100
@@ -42,21 +42,45 @@
 
 The psutil documentation you're reading is distributed as a single HTML page.
 
+
+Professional support
+====================
+
+.. image:: 
https://nedbatchelder.com/pix/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White_small.png
+    :width: 80px
+    :align: left
+
+Professional support for psutil is available as part of the `Tidelift 
Subscription`_.
+Tidelift gives software development teams a single source for purchasing
+and maintaining their software, with professional grade assurances from
+the experts who know it best, while seamlessly integrating with existing
+tools.
+By subscribing you will help me (`Giampaolo Rodola`_) support psutil
+future development. Alternatively consider making a small `donation`_.
+To report a security vulnerability, please use the `Tidelift security
+contact`_.  Tidelift will coordinate the fix and disclosure.
+
 Install
--------
+=======
 
-The easiest way to install psutil is via ``pip``::
+Linux Ubuntu / Debian::
 
-    pip install psutil
+  sudo apt-get install gcc python3-dev
+  sudo pip3 install psutil
 
-On UNIX this requires a C compiler (e.g. gcc) installed. On Windows pip will
-automatically retrieve a pre-compiled wheel version from
-`PyPI repository <https://pypi.org/project/psutil>`__.
-Alternatively, see more detailed
+Linux Redhat::
+
+  sudo yum install gcc python3-devel
+  sudo pip3 install psutil
+
+Windows::
+
+  pip3 install psutil
+
+For other platforms see more detailed
 `install <https://github.com/giampaolo/psutil/blob/master/INSTALL.rst>`_
 instructions.
 
-
 System related functions
 ========================
 
@@ -2635,6 +2659,14 @@
 Timeline
 ========
 
+- 2019-11-26:
+  `5.6.7 <https://pypi.org/project/psutil/5.6.7/#files>`__ -
+  `what's new 
<https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#567>`__ -
+  `diff 
<https://github.com/giampaolo/psutil/compare/release-5.6.6...release-5.6.7#files_bucket>`__
+- 2019-11-25:
+  `5.6.6 <https://pypi.org/project/psutil/5.6.6/#files>`__ -
+  `what's new 
<https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#566>`__ -
+  `diff 
<https://github.com/giampaolo/psutil/compare/release-5.6.5...release-5.6.6#files_bucket>`__
 - 2019-11-06:
   `5.6.5 <https://pypi.org/project/psutil/5.6.5/#files>`__ -
   `what's new 
<https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#565>`__ -
@@ -2948,11 +2980,13 @@
 .. _`cpu_distribution.py`: 
https://github.com/giampaolo/psutil/blob/master/scripts/cpu_distribution.py
 .. _`development guide`: 
https://github.com/giampaolo/psutil/blob/master/docs/DEVGUIDE.rst
 .. _`disk_usage.py`: 
https://github.com/giampaolo/psutil/blob/master/scripts/disk_usage.py
+.. _`donation`: 
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A9ZS7PKKRM3S8
 .. _`enums`: https://docs.python.org/3/library/enum.html#module-enum
 .. _`fans.py`: https://github.com/giampaolo/psutil/blob/master/scripts/fans.py
 .. _`GetDriveType`: 
https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getdrivetypea
 .. _`getfsstat`: http://www.manpagez.com/man/2/getfsstat/
 .. _`GetPriorityClass`: 
https://docs.microsoft.com/en-us/windows/desktop/api/processthreadsapi/nf-processthreadsapi-getpriorityclass
+.. _`Giampaolo Rodola`: http://grodola.blogspot.com/p/about.html
 .. _`hash`: https://docs.python.org/3/library/functions.html#hash
 .. _`ifconfig.py`: 
https://github.com/giampaolo/psutil/blob/master/scripts/ifconfig.py
 .. _`ioprio_get`: https://linux.die.net/man/2/ioprio_get
@@ -2994,3 +3028,5 @@
 .. _`subprocess.Popen`: 
https://docs.python.org/3/library/subprocess.html#subprocess.Popen
 .. _`temperatures.py`: 
https://github.com/giampaolo/psutil/blob/master/scripts/temperatures.py
 .. _`TerminateProcess`: 
https://docs.microsoft.com/en-us/windows/desktop/api/processthreadsapi/nf-processthreadsapi-terminateprocess
+.. _Tidelift security contact: https://tidelift.com/security
+.. _Tidelift Subscription: 
https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=readme
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/psutil/__init__.py 
new/psutil-5.6.7/psutil/__init__.py
--- old/psutil-5.6.5/psutil/__init__.py 2019-11-06 09:51:12.000000000 +0100
+++ new/psutil-5.6.7/psutil/__init__.py 2019-11-26 06:57:53.000000000 +0100
@@ -222,7 +222,7 @@
 
 __all__.extend(_psplatform.__extra__all__)
 __author__ = "Giampaolo Rodola'"
-__version__ = "5.6.5"
+__version__ = "5.6.7"
 version_info = tuple([int(num) for num in __version__.split('.')])
 
 _timer = getattr(time, 'monotonic', time.time)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/psutil/_pslinux.py 
new/psutil-5.6.7/psutil/_pslinux.py
--- old/psutil-5.6.5/psutil/_pslinux.py 2019-10-21 08:43:32.000000000 +0200
+++ new/psutil-5.6.7/psutil/_pslinux.py 2019-11-21 17:23:01.000000000 +0100
@@ -1649,7 +1649,13 @@
         sep = '\x00' if data.endswith('\x00') else ' '
         if data.endswith(sep):
             data = data[:-1]
-        return data.split(sep)
+        cmdline = data.split(sep)
+        # Sometimes last char is a null byte '\0' but the args are
+        # separated by spaces, see: https://github.com/giampaolo/psutil/
+        # issues/1179#issuecomment-552984549
+        if sep == '\x00' and len(cmdline) == 1 and ' ' in data:
+            cmdline = data.split(' ')
+        return cmdline
 
     @wrap_exceptions
     def environ(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/psutil/_psutil_aix.c 
new/psutil-5.6.7/psutil/_psutil_aix.c
--- old/psutil-5.6.5/psutil/_psutil_aix.c       2019-09-07 21:58:56.000000000 
+0200
+++ new/psutil-5.6.7/psutil/_psutil_aix.c       2019-11-13 14:54:39.000000000 
+0100
@@ -265,8 +265,8 @@
                 goto error;
             if (PyDict_SetItem(py_retdict, py_key, py_val))
                 goto error;
-            Py_DECREF(py_key);
-            Py_DECREF(py_val);
+            Py_CLEAR(py_key);
+            Py_CLEAR(py_val);
         }
         curvar = strchr(curvar, '\0') + 1;
     }
@@ -510,10 +510,10 @@
             goto error;
         if (PyList_Append(py_retlist, py_tuple))
             goto error;
-        Py_DECREF(py_username);
-        Py_DECREF(py_tty);
-        Py_DECREF(py_hostname);
-        Py_DECREF(py_tuple);
+        Py_CLEAR(py_username);
+        Py_CLEAR(py_tty);
+        Py_CLEAR(py_hostname);
+        Py_CLEAR(py_tuple);
     }
     endutxent();
 
@@ -570,9 +570,9 @@
             goto error;
         if (PyList_Append(py_retlist, py_tuple))
             goto error;
-        Py_DECREF(py_dev);
-        Py_DECREF(py_mountp);
-        Py_DECREF(py_tuple);
+        Py_CLEAR(py_dev);
+        Py_CLEAR(py_mountp);
+        Py_CLEAR(py_tuple);
         mt = getmntent(file);
     }
     endmntent(file);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/psutil/_psutil_bsd.c 
new/psutil-5.6.7/psutil/_psutil_bsd.c
--- old/psutil-5.6.5/psutil/_psutil_bsd.c       2019-10-21 08:43:32.000000000 
+0200
+++ new/psutil-5.6.7/psutil/_psutil_bsd.c       2019-11-20 09:39:49.000000000 
+0100
@@ -154,7 +154,7 @@
                 goto error;
             if (PyList_Append(py_retlist, py_pid))
                 goto error;
-            Py_DECREF(py_pid);
+            Py_CLEAR(py_pid);
             proclist++;
         }
         free(orig_address);
@@ -507,8 +507,8 @@
                 goto error;
             if (PyList_Append(py_retlist, py_tuple))
                 goto error;
-            Py_DECREF(py_path);
-            Py_DECREF(py_tuple);
+            Py_CLEAR(py_path);
+            Py_CLEAR(py_tuple);
         }
     }
     free(freep);
@@ -670,9 +670,9 @@
             goto error;
         if (PyList_Append(py_retlist, py_tuple))
             goto error;
-        Py_DECREF(py_dev);
-        Py_DECREF(py_mountp);
-        Py_DECREF(py_tuple);
+        Py_CLEAR(py_dev);
+        Py_CLEAR(py_mountp);
+        Py_CLEAR(py_tuple);
     }
 
     free(fs);
@@ -765,7 +765,7 @@
                 goto error;
             if (PyDict_SetItemString(py_retdict, ifc_name, py_ifc_info))
                 goto error;
-            Py_DECREF(py_ifc_info);
+            Py_CLEAR(py_ifc_info);
         }
         else {
             continue;
@@ -802,7 +802,9 @@
     struct utmp ut;
     FILE *fp;
 
+    Py_BEGIN_ALLOW_THREADS
     fp = fopen(_PATH_UTMP, "r");
+    Py_END_ALLOW_THREADS
     if (fp == NULL) {
         PyErr_SetFromErrnoWithFilename(PyExc_OSError, _PATH_UTMP);
         goto error;
@@ -840,10 +842,10 @@
             fclose(fp);
             goto error;
         }
-        Py_DECREF(py_username);
-        Py_DECREF(py_tty);
-        Py_DECREF(py_hostname);
-        Py_DECREF(py_tuple);
+        Py_CLEAR(py_username);
+        Py_CLEAR(py_tty);
+        Py_CLEAR(py_hostname);
+        Py_CLEAR(py_tuple);
     }
 
     fclose(fp);
@@ -883,10 +885,10 @@
             endutxent();
             goto error;
         }
-        Py_DECREF(py_username);
-        Py_DECREF(py_tty);
-        Py_DECREF(py_hostname);
-        Py_DECREF(py_tuple);
+        Py_CLEAR(py_username);
+        Py_CLEAR(py_tty);
+        Py_CLEAR(py_hostname);
+        Py_CLEAR(py_tuple);
     }
 
     endutxent();
@@ -1040,7 +1042,7 @@
     if (PyModule_AddIntConstant(mod, "SRUN", SRUN)) INITERR;
     if (PyModule_AddIntConstant(mod, "SSLEEP", SSLEEP)) INITERR;
     if (PyModule_AddIntConstant(mod, "SSTOP", SSTOP)) INITERR;
-    if (PyModule_AddIntConstant(mod, "SZOMB", SZOMB); INITERR; // unused
+    if (PyModule_AddIntConstant(mod, "SZOMB", SZOMB)) INITERR; // unused
     if (PyModule_AddIntConstant(mod, "SDEAD", SDEAD)) INITERR;
     if (PyModule_AddIntConstant(mod, "SONPROC", SONPROC)) INITERR;
 #elif defined(PSUTIL_NETBSD)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/psutil/_psutil_linux.c 
new/psutil-5.6.7/psutil/_psutil_linux.c
--- old/psutil-5.6.5/psutil/_psutil_linux.c     2019-10-21 08:43:32.000000000 
+0200
+++ new/psutil-5.6.7/psutil/_psutil_linux.c     2019-11-13 14:54:39.000000000 
+0100
@@ -241,9 +241,9 @@
             goto error;
         if (PyList_Append(py_retlist, py_tuple))
             goto error;
-        Py_DECREF(py_dev);
-        Py_DECREF(py_mountp);
-        Py_DECREF(py_tuple);
+        Py_CLEAR(py_dev);
+        Py_CLEAR(py_mountp);
+        Py_CLEAR(py_tuple);
     }
     endmntent(file);
     return py_retlist;
@@ -454,10 +454,10 @@
             goto error;
         if (PyList_Append(py_retlist, py_tuple))
             goto error;
-        Py_DECREF(py_username);
-        Py_DECREF(py_tty);
-        Py_DECREF(py_hostname);
-        Py_DECREF(py_tuple);
+        Py_CLEAR(py_username);
+        Py_CLEAR(py_tty);
+        Py_CLEAR(py_hostname);
+        Py_CLEAR(py_tuple);
     }
     endutent();
     return py_retlist;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/psutil/_psutil_osx.c 
new/psutil-5.6.7/psutil/_psutil_osx.c
--- old/psutil-5.6.5/psutil/_psutil_osx.c       2019-10-21 08:43:32.000000000 
+0200
+++ new/psutil-5.6.7/psutil/_psutil_osx.c       2019-11-13 14:54:39.000000000 
+0100
@@ -138,7 +138,7 @@
             goto error;
         if (PyList_Append(py_retlist, py_pid))
             goto error;
-        Py_DECREF(py_pid);
+        Py_CLEAR(py_pid);
         proclist++;
     }
     free(orig_address);
@@ -653,7 +653,7 @@
             goto error;
         if (PyList_Append(py_retlist, py_cputime))
             goto error;
-        Py_DECREF(py_cputime);
+        Py_CLEAR(py_cputime);
     }
 
     ret = vm_deallocate(mach_task_self(), (vm_address_t)info_array,
@@ -841,9 +841,9 @@
             goto error;
         if (PyList_Append(py_retlist, py_tuple))
             goto error;
-        Py_DECREF(py_dev);
-        Py_DECREF(py_mountp);
-        Py_DECREF(py_tuple);
+        Py_CLEAR(py_dev);
+        Py_CLEAR(py_mountp);
+        Py_CLEAR(py_tuple);
     }
 
     free(fs);
@@ -911,7 +911,6 @@
     }
 
     for (j = 0; j < thread_count; j++) {
-        py_tuple = NULL;
         thread_info_count = THREAD_INFO_MAX;
         kr = thread_info(thread_list[j], THREAD_BASIC_INFO,
                          (thread_info_t)thinfo_basic, &thread_info_count);
@@ -934,7 +933,7 @@
             goto error;
         if (PyList_Append(py_retlist, py_tuple))
             goto error;
-        Py_DECREF(py_tuple);
+        Py_CLEAR(py_tuple);
     }
 
     ret = vm_deallocate(task, (vm_address_t)thread_list,
@@ -1043,10 +1042,8 @@
                 goto error;
             if (PyList_Append(py_retlist, py_tuple))
                 goto error;
-            Py_DECREF(py_tuple);
-            py_tuple = NULL;
-            Py_DECREF(py_path);
-            py_path = NULL;
+            Py_CLEAR(py_tuple);
+            Py_CLEAR(py_path);
             // --- /construct python list
         }
     }
@@ -1226,7 +1223,7 @@
                     goto error;
                 if (PyList_Append(py_retlist, py_tuple))
                     goto error;
-                Py_DECREF(py_tuple);
+                Py_CLEAR(py_tuple);
             }
             else if (family == AF_UNIX) {
                 py_laddr = PyUnicode_DecodeFSDefault(
@@ -1248,9 +1245,9 @@
                     goto error;
                 if (PyList_Append(py_retlist, py_tuple))
                     goto error;
-                Py_DECREF(py_tuple);
-                Py_DECREF(py_laddr);
-                Py_DECREF(py_raddr);
+                Py_CLEAR(py_tuple);
+                Py_CLEAR(py_laddr);
+                Py_CLEAR(py_raddr);
             }
         }
     }
@@ -1370,7 +1367,7 @@
                 goto error;
             if (PyDict_SetItemString(py_retdict, ifc_name, py_ifc_info))
                 goto error;
-            Py_DECREF(py_ifc_info);
+            Py_CLEAR(py_ifc_info);
         }
         else {
             continue;
@@ -1543,7 +1540,7 @@
                 goto error;
             if (PyDict_SetItemString(py_retdict, disk_name, py_disk_info))
                 goto error;
-            Py_DECREF(py_disk_info);
+            Py_CLEAR(py_disk_info);
 
             CFRelease(parent_dict);
             IOObjectRelease(parent);
@@ -1605,10 +1602,10 @@
             endutxent();
             goto error;
         }
-        Py_DECREF(py_username);
-        Py_DECREF(py_tty);
-        Py_DECREF(py_hostname);
-        Py_DECREF(py_tuple);
+        Py_CLEAR(py_username);
+        Py_CLEAR(py_tty);
+        Py_CLEAR(py_hostname);
+        Py_CLEAR(py_tuple);
     }
 
     endutxent();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/psutil/_psutil_posix.c 
new/psutil-5.6.7/psutil/_psutil_posix.c
--- old/psutil-5.6.5/psutil/_psutil_posix.c     2019-10-21 08:43:32.000000000 
+0200
+++ new/psutil-5.6.7/psutil/_psutil_posix.c     2019-11-20 05:39:23.000000000 
+0100
@@ -324,11 +324,11 @@
             goto error;
         if (PyList_Append(py_retlist, py_tuple))
             goto error;
-        Py_DECREF(py_tuple);
-        Py_DECREF(py_address);
-        Py_DECREF(py_netmask);
-        Py_DECREF(py_broadcast);
-        Py_DECREF(py_ptp);
+        Py_CLEAR(py_tuple);
+        Py_CLEAR(py_address);
+        Py_CLEAR(py_netmask);
+        Py_CLEAR(py_broadcast);
+        Py_CLEAR(py_ptp);
     }
 
     freeifaddrs(ifaddr);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/psutil/_psutil_sunos.c 
new/psutil-5.6.7/psutil/_psutil_sunos.c
--- old/psutil-5.6.5/psutil/_psutil_sunos.c     2019-11-04 08:33:31.000000000 
+0100
+++ new/psutil-5.6.7/psutil/_psutil_sunos.c     2019-11-13 14:54:39.000000000 
+0100
@@ -300,8 +300,8 @@
         if (PyDict_SetItem(py_retdict, py_envname, py_envval) < 0)
             goto error;
 
-        Py_DECREF(py_envname);
-        Py_DECREF(py_envval);
+        Py_CLEAR(py_envname);
+        Py_CLEAR(py_envval);
     }
 
     psutil_free_cstrings_array(env, env_count);
@@ -655,10 +655,10 @@
             goto error;
         if (PyList_Append(py_retlist, py_tuple))
             goto error;
-        Py_DECREF(py_username);
-        Py_DECREF(py_tty);
-        Py_DECREF(py_hostname);
-        Py_DECREF(py_tuple);
+        Py_CLEAR(py_username);
+        Py_CLEAR(py_tty);
+        Py_CLEAR(py_hostname);
+        Py_CLEAR(py_tuple);
     }
     endutxent();
 
@@ -714,9 +714,9 @@
             goto error;
         if (PyList_Append(py_retlist, py_tuple))
             goto error;
-        Py_DECREF(py_dev);
-        Py_DECREF(py_mountp);
-        Py_DECREF(py_tuple);
+        Py_CLEAR(py_dev);
+        Py_CLEAR(py_mountp);
+        Py_CLEAR(py_tuple);
     }
     fclose(file);
     return py_retlist;
@@ -767,8 +767,7 @@
                 goto error;
             if (PyList_Append(py_retlist, py_cputime))
                 goto error;
-            Py_DECREF(py_cputime);
-            py_cputime = NULL;
+            Py_CLEAR(py_cputime);
         }
     }
 
@@ -824,7 +823,7 @@
                 if (PyDict_SetItemString(py_retdict, ksp->ks_name,
                                          py_disk_info))
                     goto error;
-                Py_DECREF(py_disk_info);
+                Py_CLEAR(py_disk_info);
             }
         }
         ksp = ksp->ks_next;
@@ -959,8 +958,8 @@
             goto error;
         if (PyList_Append(py_retlist, py_tuple))
             goto error;
-        Py_DECREF(py_path);
-        Py_DECREF(py_tuple);
+        Py_CLEAR(py_path);
+        Py_CLEAR(py_tuple);
 
         // increment pointer
         p += 1;
@@ -1075,7 +1074,7 @@
             goto error;
         if (PyDict_SetItemString(py_retdict, ksp->ks_name, py_ifc_info))
             goto error;
-        Py_DECREF(py_ifc_info);
+        Py_CLEAR(py_ifc_info);
         goto next;
 
 next:
@@ -1273,7 +1272,7 @@
                     goto error;
                 if (PyList_Append(py_retlist, py_tuple))
                     goto error;
-                Py_DECREF(py_tuple);
+                Py_CLEAR(py_tuple);
             }
         }
 #if defined(AF_INET6)
@@ -1287,7 +1286,7 @@
 #ifdef NEW_MIB_COMPLIANT
                 processed_pid = tp6.tcp6ConnCreationProcess;
 #else
-                       processed_pid = 0;
+                        processed_pid = 0;
 #endif
                 if (pid != -1 && processed_pid != pid)
                     continue;
@@ -1316,14 +1315,14 @@
                     goto error;
                 if (PyList_Append(py_retlist, py_tuple))
                     goto error;
-                Py_DECREF(py_tuple);
+                Py_CLEAR(py_tuple);
             }
         }
 #endif
         // UDPv4
         else if (mibhdr.level == MIB2_UDP || mibhdr.level == MIB2_UDP_ENTRY) {
             num_ent = mibhdr.len / sizeof(mib2_udpEntry_t);
-           assert(num_ent * sizeof(mib2_udpEntry_t) == mibhdr.len);
+            assert(num_ent * sizeof(mib2_udpEntry_t) == mibhdr.len);
             for (i = 0; i < num_ent; i++) {
                 memcpy(&ude, databuf.buf + i * sizeof ude, sizeof ude);
 #ifdef NEW_MIB_COMPLIANT
@@ -1355,7 +1354,7 @@
                     goto error;
                 if (PyList_Append(py_retlist, py_tuple))
                     goto error;
-                Py_DECREF(py_tuple);
+                Py_CLEAR(py_tuple);
             }
         }
 #if defined(AF_INET6)
@@ -1388,7 +1387,7 @@
                     goto error;
                 if (PyList_Append(py_retlist, py_tuple))
                     goto error;
-                Py_DECREF(py_tuple);
+                Py_CLEAR(py_tuple);
             }
         }
 #endif
@@ -1561,7 +1560,7 @@
                 goto error;
             if (PyDict_SetItemString(py_retdict, ksp->ks_name, py_ifc_info))
                 goto error;
-            Py_DECREF(py_ifc_info);
+            Py_CLEAR(py_ifc_info);
         }
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/psutil/_psutil_windows.c 
new/psutil-5.6.7/psutil/_psutil_windows.c
--- old/psutil-5.6.5/psutil/_psutil_windows.c   2019-11-01 11:38:34.000000000 
+0100
+++ new/psutil-5.6.7/psutil/_psutil_windows.c   2019-11-26 06:53:47.000000000 
+0100
@@ -221,7 +221,7 @@
             goto error;
         if (PyList_Append(py_retlist, py_pid))
             goto error;
-        Py_DECREF(py_pid);
+        Py_CLEAR(py_pid);
     }
 
     // free C array allocated for PIDs
@@ -243,7 +243,6 @@
 static PyObject *
 psutil_proc_kill(PyObject *self, PyObject *args) {
     HANDLE hProcess;
-    DWORD err;
     long pid;
 
     if (! PyArg_ParseTuple(args, "l", &pid))
@@ -265,13 +264,11 @@
         return NULL;
     }
 
-    // kill the process
     if (! TerminateProcess(hProcess, SIGTERM)) {
-        err = GetLastError();
-        // See: https://github.com/giampaolo/psutil/issues/1099
-        if (err != ERROR_ACCESS_DENIED) {
+        // ERROR_ACCESS_DENIED may happen if the process already died. See:
+        // https://github.com/giampaolo/psutil/issues/1099
+        if (GetLastError() != ERROR_ACCESS_DENIED) {
             PyErr_SetFromOSErrnoWithSyscall("TerminateProcess");
-            CloseHandle(hProcess);
             return NULL;
         }
     }
@@ -1003,7 +1000,7 @@
             goto error;
         if (PyList_Append(py_retlist, py_tuple))
             goto error;
-        Py_DECREF(py_tuple);
+        Py_CLEAR(py_tuple);
     }
 
     free(sppi);
@@ -1156,7 +1153,7 @@
                 goto error;
             if (PyList_Append(py_retlist, py_tuple))
                 goto error;
-            Py_DECREF(py_tuple);
+            Py_CLEAR(py_tuple);
 
             CloseHandle(hThread);
         }
@@ -1580,7 +1577,7 @@
                 goto error;
             if (PyList_Append(py_retlist, py_conn_tuple))
                 goto error;
-            Py_DECREF(py_conn_tuple);
+            Py_CLEAR(py_conn_tuple);
         }
 
         free(table);
@@ -1667,7 +1664,7 @@
                 goto error;
             if (PyList_Append(py_retlist, py_conn_tuple))
                 goto error;
-            Py_DECREF(py_conn_tuple);
+            Py_CLEAR(py_conn_tuple);
         }
 
         free(table);
@@ -1730,7 +1727,7 @@
                 goto error;
             if (PyList_Append(py_retlist, py_conn_tuple))
                 goto error;
-            Py_DECREF(py_conn_tuple);
+            Py_CLEAR(py_conn_tuple);
         }
 
         free(table);
@@ -1793,7 +1790,7 @@
                 goto error;
             if (PyList_Append(py_retlist, py_conn_tuple))
                 goto error;
-            Py_DECREF(py_conn_tuple);
+            Py_CLEAR(py_conn_tuple);
         }
 
         free(table);
@@ -2188,8 +2185,8 @@
             goto error;
         if (PyDict_SetItem(py_retdict, py_nic_name, py_nic_info))
             goto error;
-        Py_XDECREF(py_nic_name);
-        Py_XDECREF(py_nic_info);
+        Py_CLEAR(py_nic_name);
+        Py_CLEAR(py_nic_info);
 
         free(pIfRow);
         pCurrAddresses = pCurrAddresses->Next;
@@ -2304,7 +2301,7 @@
             goto error;
         if (PyDict_SetItemString(py_retdict, szDeviceDisplay, py_tuple))
             goto error;
-        Py_XDECREF(py_tuple);
+        Py_CLEAR(py_tuple);
 
 next:
         CloseHandle(hDevice);
@@ -2461,7 +2458,7 @@
                             goto error;
                         }
 
-                        Py_DECREF(py_tuple);
+                        Py_CLEAR(py_tuple);
 
                         // Continue looking for more mount points
                         mp_flag = FindNextVolumeMountPoint(mp_h, mp_buf, 
MAX_PATH);
@@ -2486,7 +2483,7 @@
             goto error;
         if (PyList_Append(py_retlist, py_tuple))
             goto error;
-        Py_DECREF(py_tuple);
+        Py_CLEAR(py_tuple);
         goto next;
 
 next:
@@ -2610,9 +2607,9 @@
             goto error;
         if (PyList_Append(py_retlist, py_tuple))
             goto error;
-        Py_XDECREF(py_username);
-        Py_XDECREF(py_address);
-        Py_XDECREF(py_tuple);
+        Py_CLEAR(py_username);
+        Py_CLEAR(py_address);
+        Py_CLEAR(py_tuple);
     }
 
     WTSFreeMemory(sessions);
@@ -2838,8 +2835,8 @@
                 goto error;
             if (PyList_Append(py_retlist, py_tuple))
                 goto error;
-            Py_DECREF(py_tuple);
-            Py_DECREF(py_str);
+            Py_CLEAR(py_tuple);
+            Py_CLEAR(py_str);
         }
         previousAllocationBase = (ULONGLONG)basicInfo.AllocationBase;
         baseAddress = (PCHAR)baseAddress + basicInfo.RegionSize;
@@ -2889,8 +2886,8 @@
                 goto error;
             if (PyDict_SetItem(py_retdict, py_pid, py_ppid))
                 goto error;
-            Py_DECREF(py_pid);
-            Py_DECREF(py_ppid);
+            Py_CLEAR(py_pid);
+            Py_CLEAR(py_ppid);
         } while (Process32Next(handle, &pe));
     }
 
@@ -2993,8 +2990,8 @@
                 goto error;
             if (PyList_Append(py_retlist, py_tuple))
                 goto error;
-            Py_DECREF(py_tuple);
-            Py_DECREF(py_mac_address);
+            Py_CLEAR(py_tuple);
+            Py_CLEAR(py_mac_address);
         }
 
         // find out the IP address associated with the NIC
@@ -3070,14 +3067,14 @@
                     goto error;
                 if (PyList_Append(py_retlist, py_tuple))
                     goto error;
-                Py_DECREF(py_tuple);
-                Py_DECREF(py_address);
-                Py_DECREF(py_netmask);
+                Py_CLEAR(py_tuple);
+                Py_CLEAR(py_address);
+                Py_CLEAR(py_netmask);
 
                 pUnicast = pUnicast->Next;
             }
         }
-        Py_DECREF(py_nic_name);
+        Py_CLEAR(py_nic_name);
         pCurrAddresses = pCurrAddresses->Next;
     }
 
@@ -3197,8 +3194,8 @@
             goto error;
         if (PyDict_SetItem(py_retdict, py_nic_name, py_ifc_info))
             goto error;
-        Py_DECREF(py_nic_name);
-        Py_DECREF(py_ifc_info);
+        Py_CLEAR(py_nic_name);
+        Py_CLEAR(py_ifc_info);
     }
 
     free(pIfTable);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/psutil/arch/windows/process_info.c 
new/psutil-5.6.7/psutil/arch/windows/process_info.c
--- old/psutil-5.6.5/psutil/arch/windows/process_info.c 2019-11-04 
08:27:58.000000000 +0100
+++ new/psutil-5.6.7/psutil/arch/windows/process_info.c 2019-11-20 
11:05:53.000000000 +0100
@@ -345,8 +345,7 @@
         return 1;
     if (pid < 0)
         return 0;
-    hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,
-                           FALSE, pid);
+    hProcess = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid);
     if (NULL == hProcess) {
         err = GetLastError();
         // Yeah, this is the actual error code in case of "no such process".
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/psutil/tests/test_linux.py 
new/psutil-5.6.7/psutil/tests/test_linux.py
--- old/psutil-5.6.5/psutil/tests/test_linux.py 2019-10-10 09:59:48.000000000 
+0200
+++ new/psutil-5.6.7/psutil/tests/test_linux.py 2019-11-21 17:23:25.000000000 
+0100
@@ -1837,6 +1837,16 @@
             self.assertEqual(p.cmdline(), ['foo', 'bar', ''])
             assert m.called
 
+    def test_cmdline_mixed_separators(self):
+        # https://github.com/giampaolo/psutil/issues/
+        #    1179#issuecomment-552984549
+        p = psutil.Process()
+        fake_file = io.StringIO(u('foo\x20bar\x00'))
+        with mock.patch('psutil._common.open',
+                        return_value=fake_file, create=True) as m:
+            self.assertEqual(p.cmdline(), ['foo', 'bar'])
+            assert m.called
+
     def test_readlink_path_deleted_mocked(self):
         with mock.patch('psutil._pslinux.os.readlink',
                         return_value='/home/foo (deleted)'):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/psutil.egg-info/PKG-INFO 
new/psutil-5.6.7/psutil.egg-info/PKG-INFO
--- old/psutil-5.6.5/psutil.egg-info/PKG-INFO   2019-11-06 11:07:24.000000000 
+0100
+++ new/psutil-5.6.7/psutil.egg-info/PKG-INFO   2019-11-26 08:25:38.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: psutil
-Version: 5.6.5
+Version: 5.6.7
 Summary: Cross-platform lib for process and system monitoring in Python.
 Home-page: https://github.com/giampaolo/psutil
 Author: Giampaolo Rodola
@@ -127,8 +127,6 @@
                By subscribing you will help me (`Giampaolo Rodola`_) support 
psutil
                future development. Alternatively consider making a small 
`donation`_.
         
-        .. _Tidelift Subscription: 
https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=readme
-        
         Security
         ========
         
@@ -523,6 +521,8 @@
         .. _`Giampaolo Rodola`: http://grodola.blogspot.com/p/about.html
         .. _`donation`: 
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A9ZS7PKKRM3S8
         .. _Tidelift security contact: https://tidelift.com/security
+        .. _Tidelift Subscription: 
https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=readme
+        
         
 Keywords: 
ps,top,kill,free,lsof,netstat,nice,tty,ionice,uptime,taskmgr,process,df,iotop,iostat,ifconfig,taskset,who,pidof,pmap,smem,pstree,monitoring,ulimit,prlimit,smem,performance,metrics,agent,observability
 Platform: Platform Independent
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/scripts/internal/download_exes.py 
new/psutil-5.6.7/scripts/internal/download_exes.py
--- old/psutil-5.6.5/scripts/internal/download_exes.py  2019-10-24 
12:26:00.000000000 +0200
+++ new/psutil-5.6.7/scripts/internal/download_exes.py  2019-11-21 
17:05:45.000000000 +0100
@@ -26,7 +26,7 @@
 
 
 BASE_URL = 'https://ci.appveyor.com/api'
-PY_VERSIONS = ['2.7', '3.5', '3.6', '3.7']
+PY_VERSIONS = ['2.7', '3.5', '3.6', '3.7', '3.8']
 TIMEOUT = 30
 COLORS = True
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psutil-5.6.5/tox.ini new/psutil-5.6.7/tox.ini
--- old/psutil-5.6.5/tox.ini    2019-10-24 12:25:51.000000000 +0200
+++ new/psutil-5.6.7/tox.ini    2019-11-20 07:13:17.000000000 +0100
@@ -5,7 +5,7 @@
 # directory.
 
 [tox]
-envlist = py26, py27, py34, py35, py36, py37, lint
+envlist = py26, py27, py34, py35, py36, py37, py38, lint
 
 [testenv]
 deps =


Reply via email to