)]}'
{
  "commit": "769d44c87227c44d21ded11b06fb89cdebc64f2f",
  "tree": "e58da114cfbbde8ecf7c1d9a35903519b482a463",
  "parents": [
    "197d33218f755af0758c83add3956e0bd7ef8657"
  ],
  "author": {
    "name": "Jason Mak",
    "email": "271474413+JMak-Security@users.noreply.github.com",
    "time": "Mon Oct 19 19:45:48 2026"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Oct 19 19:45:48 2026"
  },
  "message": "gh-156057: Wrap compression library exceptions in tarfile.ReadError (GH-156143)\n\n_FileInFile.read() (used by TarFile.extractfile() for seekable-mode\narchives) called the underlying compressed fileobj\u0027s read() directly.\nIf a member\u0027s compressed payload was corrupted after the header had\nalready been read successfully, the codec\u0027s own exception (zlib.error,\nOSError from bz2, lzma.LZMAError, or zstd.ZstdError) would leak straight\nthrough instead of being wrapped in tarfile.ReadError, unlike the\nexisting streaming-mode (r|gz etc.) code path in _Stream, which already\nhandles this correctly via a self.exception attribute set per codec.\n\nGive TarFile (and _FileInFile) the same per-codec exception attribute,\nset by gzopen/xzopen/zstopen to the specific error type (bz2 already\nmatches the OSError class default), and wrap the read() call in\n_FileInFile with it.\n\n---------\n\nSigned-off-by: Jason Mak \u003csqurrielbro@gmail.com\u003e\nCo-authored-by: Ethan Furman \u003cethan@stoneleaf.us\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c0b9f3f429c10e26fa9430859a73499aa942b735",
      "old_mode": 33188,
      "old_path": "Lib/tarfile.py",
      "new_id": "dc2d35fc27a3dedfa78c6d261764d01f4da262b6",
      "new_mode": 33188,
      "new_path": "Lib/tarfile.py"
    },
    {
      "type": "modify",
      "old_id": "2b4cf748dffc1a9945575d3dc0b48194af8688bb",
      "old_mode": 33188,
      "old_path": "Lib/test/test_tarfile.py",
      "new_id": "605e66b6c64c9605fb25aa74ae35cc7bd209e294",
      "new_mode": 33188,
      "new_path": "Lib/test/test_tarfile.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1c8d8839dbf7bd7c06f632802c4c4a7014ff9242",
      "new_mode": 33188,
      "new_path": "Misc/NEWS.d/next/Library/2026-08-21-06-00-00.gh-issue-156057.tarfile-wrap-comp-err.rst"
    }
  ]
}
