)]}'
{
  "commit": "437466875753ca2a91e70d593b1f863760c2d1b8",
  "tree": "2600960426d9228b6eabe1878cd6e9730faafd1e",
  "parents": [
    "908e23cc3a766580633e8cef03e4abfc8550fad8"
  ],
  "author": {
    "name": "Giampaolo Rodola",
    "email": "g.rodola@gmail.com",
    "time": "Wed Aug 26 22:37:19 2026"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Aug 26 22:37:19 2026"
  },
  "message": "[macOS] memory_info_ex(): drop task_for_pid(), return `phys_footprint` (#2987)\n\n`task_for_pid()` has historically been a pain. From the code:\n\n```c\n// - it can *block* forever, including for PIDs of our own user, see:\n//   https://github.com/giampaolo/psutil/issues/2885\n// - it\u0027s not documented\n// - errno is set only sometimes\n// - sometimes errno is ENOENT (?!?)\n// - for PIDs !\u003d getpid() or PIDs which are not members of the procmod\n//   it requires root\n//\n// As such we can only guess what the heck went wrong and fail either\n// with NoSuchProcess or give up with AccessDenied. References:\n// - https://github.com/giampaolo/psutil/issues/1181\n// - https://github.com/giampaolo/psutil/issues/1209\n// - https://github.com/giampaolo/psutil/issues/1291#issuecomment-396062519\n```\n\nSo we drop it, and no longer return `peak_rss`, `rss_anon`, `rss_file`\nand `compressed` fields in `memory_info_ex()`. This is not a big loss,\nsince `memory_info_ex()` on macOS failed with `AccessDenied` for all\nPIDs except self.\n\nInstead we now make `memory_info_ex()` return `phys_footprint` and\n`peak_footprint`, by using `proc_pid_rusage()` syscall, which at least\nsucceeds for all PIDs owned by our user.\n\n*IMPORTANT*: `phys_footprint` is VERY useful, because it\u0027s the metrics\nreported by macOS Activity Monitor.\n\n`proc_pid_rusage()` requires macOS 10.9, so with this change we also\ndrop support for macOS 10.7 and 10.8, which is not a big loss either,\nbecause according to `print_downloads.py` script the total number of\ndownloads is literally **zero**.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f2599392c71662a718e252133ac2e7a03eeed9c7",
      "old_mode": 33188,
      "old_path": "docs/api.rst",
      "new_id": "3c3d28978c254914b2056553933ff7a7a887df93",
      "new_mode": 33188,
      "new_path": "docs/api.rst"
    },
    {
      "type": "modify",
      "old_id": "fec7407e7dbe28bc1f1bfde302b84b6734c9ffad",
      "old_mode": 33188,
      "old_path": "docs/changelog.rst",
      "new_id": "039ab525340634bd26a318db70812c49580232b2",
      "new_mode": 33188,
      "new_path": "docs/changelog.rst"
    },
    {
      "type": "modify",
      "old_id": "67070874eee92ad495c1fafba272c7191d600229",
      "old_mode": 33188,
      "old_path": "docs/migration.rst",
      "new_id": "459a63ef1ee1b7382d02d1d62041a7e3ea661a2b",
      "new_mode": 33188,
      "new_path": "docs/migration.rst"
    },
    {
      "type": "modify",
      "old_id": "6f78176480bb7a0144bc27223985040252ff867c",
      "old_mode": 33188,
      "old_path": "docs/platform.rst",
      "new_id": "cb6676aaf6be8bc072ce4722de31a40bd6757129",
      "new_mode": 33188,
      "new_path": "docs/platform.rst"
    },
    {
      "type": "modify",
      "old_id": "c95d85b11b1119a35f4bd8a9228aaab5cc804165",
      "old_mode": 33188,
      "old_path": "psutil/_ntuples.py",
      "new_id": "34a3075972bf1e204e9eb913de2b48bd531cd207",
      "new_mode": 33188,
      "new_path": "psutil/_ntuples.py"
    },
    {
      "type": "modify",
      "old_id": "b78292ab028d68a18b94bb6f334ab83f18f11254",
      "old_mode": 33188,
      "old_path": "psutil/arch/osx/init.h",
      "new_id": "ef06e9e64c8391632585273dfd208d9e9f6dee6b",
      "new_mode": 33188,
      "new_path": "psutil/arch/osx/init.h"
    },
    {
      "type": "modify",
      "old_id": "852317da6bbd4cdaf28e623b578dd2cb9aa279ca",
      "old_mode": 33188,
      "old_path": "psutil/arch/osx/proc.c",
      "new_id": "abbcfb3692b9e7d79a7b21b8b1d0e0e8a69a36a8",
      "new_mode": 33188,
      "new_path": "psutil/arch/osx/proc.c"
    },
    {
      "type": "modify",
      "old_id": "29f0438527e7fc2f0e02aa2ad0d5fafcad5fa06b",
      "old_mode": 33188,
      "old_path": "psutil/arch/osx/proc_utils.c",
      "new_id": "3b09b2ea91b11b308b2174dad23c8429d6285e9b",
      "new_mode": 33188,
      "new_path": "psutil/arch/osx/proc_utils.c"
    },
    {
      "type": "modify",
      "old_id": "9f6a09882a8243f15b7ee86fef013d3356cb6b59",
      "old_mode": 33261,
      "old_path": "tests/test_process.py",
      "new_id": "8caa9adbe6efcc01ff554e60f72c46d530a0a274",
      "new_mode": 33261,
      "new_path": "tests/test_process.py"
    },
    {
      "type": "modify",
      "old_id": "79424abec2c93e57efba0a2c7339cb25645eeaef",
      "old_mode": 33261,
      "old_path": "tests/test_process_all.py",
      "new_id": "5fef5151267b36b96abcfc50b16815c682317c2a",
      "new_mode": 33261,
      "new_path": "tests/test_process_all.py"
    }
  ]
}
