{
  "schemaVersion": "ebb.rule.v1",
  "id": "python.module.chunk.removed",
  "ecosystem": "python",
  "purl": "pkg:generic/python",
  "affectedVersions": "vers:pypi/>=3.13",
  "event": "removed",
  "severity": "high",
  "title": "The chunk module was removed in Python 3.13",
  "summary": "Python 3.13 removed the chunk module (PEP 594), so importing it raises ModuleNotFoundError.",
  "replacement": "struct",
  "sources": [
    {
      "title": "PEP 594 — Removing dead batteries from the standard library",
      "url": "https://peps.python.org/pep-0594/",
      "accessedAt": "2026-10-30"
    },
    {
      "title": "What's New in Python 3.13",
      "url": "https://docs.python.org/3/whatsnew/3.13.html",
      "accessedAt": "2026-10-30"
    }
  ],
  "provenance": {
    "observedAt": "2026-10-30",
    "reviewedAt": "2026-10-30",
    "reviewer": "arminazimi"
  },
  "migration": {
    "constraints": [
      "Keep the behavior of the code unchanged; check the replacement's argument and return-value differences."
    ],
    "steps": [
      {
        "id": "replace-import",
        "title": "Replace the chunk import",
        "instructions": "Replace each reported import of chunk with struct.",
        "targets": "usages"
      }
    ],
    "verification": [
      {
        "command": "python -W error::DeprecationWarning -m pytest",
        "purpose": "Run the tests with deprecation warnings treated as errors when pytest is used."
      }
    ]
  }
}
