diff --git a/docs/DEVNOTES b/docs/DEVNOTES index abd2e3688..7fe14f7d0 100644 --- a/docs/DEVNOTES +++ b/docs/DEVNOTES @@ -158,10 +158,11 @@ BUGFIXES - #600: windows / open_files(): support network file handles. -REJECTED -======== +REJECTED IDEAS +============== - #550: threads per core +- #1667: process_iter(new_only=True) INCONSISTENCIES =============== diff --git a/psutil/__init__.py b/psutil/__init__.py index 2f4e147fb..22bb46f3f 100644 --- a/psutil/__init__.py +++ b/psutil/__init__.py @@ -1427,7 +1427,6 @@ def process_iter(attrs=None, ad_value=None): to returned Process instance. If *attrs* is an empty list it will retrieve all process info (slow). - """ def add(pid): proc = Process(pid) @@ -1449,8 +1448,8 @@ def remove(pid): remove(pid) with _lock: - ls = list(dict.fromkeys(new_pids).items()) - ls.sort() + ls = sorted(list(_pmap.items()) + + list(dict.fromkeys(new_pids).items())) for pid, proc in ls: try: