)]}'
{
  "commit": "2d61a814d17ec7a12e8115ef6d76fa2371237b77",
  "tree": "8749a6cb1dbb9d15bd0c7b7a100e5837a785bf2a",
  "parents": [
    "7f4391bda2da5b15ff53bb768c4ccb3e029b0f5a"
  ],
  "author": {
    "name": "TEJA P C",
    "email": "39472754+PCTEJA@users.noreply.github.com",
    "time": "Mon Nov 30 14:08:05 2026 +0000"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Nov 30 14:08:05 2026 +0000"
  },
  "message": "Core: Fall back to zstandard when stdlib compression.zstd is missing (#4498)\n\n* Core: Fall back to zstandard when stdlib compression.zstd is missing\n\nPEP 784 makes compression.zstd optional, so on Python 3.14+ builds\nwithout libzstd the Avro codec import failed at module load and broke\nreading any manifest, and Puffin imports failed the same way when the\nzstandard package was missing. Move the backend selection into a shared\npyiceberg.utils.zstd module that tries the stdlib module first, then the\nzstandard package, and only raises ImportError on use when neither is\navailable.\n\nRefs #4495\n\n* Tests: Import ZStandardCodec from its defining module in puffin tests\n\nmypy with no_implicit_reexport rejects importing ZStandardCodec through\nthe pyiceberg.avro.codecs package, which does not explicitly re-export\nit. Import it from pyiceberg.avro.codecs.zstandard_codec instead.\n\n* Tests: Accept stdlib zstd wording for truncated frames in puffin tests\n\nOn Python 3.14 the stdlib compression.zstd backend reports a truncated\nframe as \u0027Compressed data ended before the end-of-stream marker was\nreached\u0027, which the existing match terms do not cover, so the truncated\nframe and concatenated frames tests failed on 3.14 only. Widen both\nmatches with end-of-stream.\n\n* Core: Bump zstandard floor to 0.19.0 and align the fallback with stdlib\n\nThe fallback relies on ZstdDecompressionObj.eof and unused_data, so zstandard 0.19.0 is the oldest safe release on Python \u003c 3.14. Empty input now raises the same ZstdError as the stdlib, the module exposes the active backend\u0027s ZstdError, and Puffin calls the shared module directly.\n\n* Tests: Move zstd codec tests to the avro file tests and cover the fallback\n\nThe codec tests belong with the other codec tests in tests/avro/test_file.py, with exact ZstdError assertions. A new subprocess test blocks only compression.zstd while zstandard is installed and roundtrips through the fallback.\n\n* Core: Make the zstd helper private and test backend selection in-process\n\nRename pyiceberg/utils/zstd.py to pyiceberg/utils/_zstd.py so compress, decompress and ZstdError do not become public API. Replace the subprocess backend tests with patch.dict and importlib.reload tests, and revert the unrelated beautifulsoup4 churn in uv.lock so only the zstandard specifier changes.\n\n---------\n\nCo-authored-by: TEJA P C \u003cpcteja@users.noreply.github.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "67e2347d019c4ebf7218ca0d89c1d661c1ae66b8",
      "old_mode": 33188,
      "old_path": "pyiceberg/avro/codecs/zstandard_codec.py",
      "new_id": "daa5c3ebbbc32e4d4d8a283b7fd2c884d769d446",
      "new_mode": 33188,
      "new_path": "pyiceberg/avro/codecs/zstandard_codec.py"
    },
    {
      "type": "modify",
      "old_id": "b0794ebbe75adf5dc1587e0ebf5dbff1af001f81",
      "old_mode": 33188,
      "old_path": "pyiceberg/table/puffin.py",
      "new_id": "e7edb7769216eb1c42d02535fef8f062636565e0",
      "new_mode": 33188,
      "new_path": "pyiceberg/table/puffin.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "01faec1cf1b876104bc0193bdcd70b62bcb97623",
      "new_mode": 33188,
      "new_path": "pyiceberg/utils/_zstd.py"
    },
    {
      "type": "modify",
      "old_id": "6ff2bac669894f836b385817b8049517a095062b",
      "old_mode": 33188,
      "old_path": "pyproject.toml",
      "new_id": "dc5f7df558ec31fd7898d7dfa8debf962f586d60",
      "new_mode": 33188,
      "new_path": "pyproject.toml"
    },
    {
      "type": "modify",
      "old_id": "595fceb58509deb2b89078db9ebfdf915a613aa4",
      "old_mode": 33188,
      "old_path": "tests/avro/test_file.py",
      "new_id": "117bf880caee75ada6b30231f72a0ed83a7313c4",
      "new_mode": 33188,
      "new_path": "tests/avro/test_file.py"
    },
    {
      "type": "modify",
      "old_id": "93b16158bb3a4530e90f283f974dff8d8af86c6a",
      "old_mode": 33188,
      "old_path": "tests/table/test_puffin.py",
      "new_id": "9d5766e08d76b654056e9b6d94ab56a60c31e5a6",
      "new_mode": 33188,
      "new_path": "tests/table/test_puffin.py"
    },
    {
      "type": "modify",
      "old_id": "4825090b0ee7300a5a0ee0e71e642dd2eaea30fe",
      "old_mode": 33188,
      "old_path": "uv.lock",
      "new_id": "0b48446ccf8e7bc66a12d907ac663002354340e4",
      "new_mode": 33188,
      "new_path": "uv.lock"
    }
  ]
}
