)]}'
{
  "commit": "e8c3dafa5f529e85d7179441be7d039ee9e062bc",
  "tree": "5bd5690b3d62e2550e5adfaf15fc5e03a0bfa83d",
  "parents": [
    "27365c5189999e3326e097d9eef4aeaae88651c1"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Wed Nov 22 19:02:34 2023 +0100"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Wed Nov 22 19:02:34 2023 +0100"
  },
  "message": "[gdb/python] Don\u0027t import curses.ascii module unless necessary\n\nI ran into a failure in test-case gdb.python/py-missing-debug.exp with python\n3.6, which was fixed by commit 7db795bc67a (\"gdb/python: remove use of\nstr.isascii()\").\n\nHowever, I subsequently ran into a failure with python 3.11:\n...\n(gdb) PASS: $exp: initial checks: debug info no longer found\nsource py-missing-debug.py^M\nTraceback (most recent call last):^M\n  File \"py-missing-debug.py\", line 17, in \u003cmodule\u003e^M\n    from gdb.missing_debug import MissingDebugHandler^M\n  File \"missing_debug.py\", line 21, in \u003cmodule\u003e^M\n    from curses.ascii import isascii, isalnum^M\n  File \"/usr/lib64/python3.11/_import_failed/curses.py\", line 16, in \u003cmodule\u003e^M\n    raise ImportError(f\"\"\"Module \u0027{failed_name}\u0027 is not installed.^M\nImportError: Module \u0027curses\u0027 is not installed.^M\nUse:^M\n  sudo zypper install python311-curses^M\nto install it.^M\n(gdb) FAIL: $exp: source python script\n...\n\nApparently I have the curses module installed for 3.6, but not 3.11.\n\nI could just install it, but the test-case worked fine with 3.11 before commit\n7db795bc67a.\n\nFix this by only using the curses module when necessary, for python \u003c\u003d 3.7.\n\nTested on x86_64-linux, with both python 3.6 and 3.11.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bb233a66c73eb52fb6b83c2e00c7b0e94a5207f7",
      "old_mode": 33188,
      "old_path": "gdb/python/lib/gdb/missing_debug.py",
      "new_id": "b693bf2e47799d6d755e427ed062e708c86d22f8",
      "new_mode": 33188,
      "new_path": "gdb/python/lib/gdb/missing_debug.py"
    }
  ]
}
