)]}'
{
  "commit": "52de0c739d2f066ea06fa9a886bc8fcc9fa079c6",
  "tree": "f3b2efc170e43b8eb526a34d9c110da826e23094",
  "parents": [
    "bfa3b88ea1c80a4f1f860fad4ab344d8fc28c868"
  ],
  "author": {
    "name": "Jo",
    "email": "46752250+georgesittas@users.noreply.github.com",
    "time": "Wed Jun 03 19:32:08 2026 +0300"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Jun 03 18:32:08 2026 +0200"
  },
  "message": "[mypyc] Preserve inherited attribute defaults under separate\u003dTrue (#21547)\n\nFixes #21542\n\nUnder `separate\u003dTrue`, when a subclass is recompiled while its parent is\nloaded from mypy\u0027s incremental cache, parent default-attribute\nassignments are silently dropped from the subclass\u0027s\n`__mypyc_defaults_setup`. The first read of an inherited default-attr\nthen raises:\n\n```\n    AttributeError: attribute \u0027\u003cname\u003e\u0027 of \u0027\u003cParent\u003e\u0027 undefined\n```\n\n`find_attr_initializers` walks `cdef.info.mro` and reads\n`info.defn.defs.body` for `AssignmentStmt`s. `ClassDef.serialize`\n(mypy/nodes.py) does not serialize `defs`, so a cache-loaded parent has\n`defs \u003d Block([])`; the MRO walk collects no parent assignments and the\nsubclass\u0027s emitted setup leaves inherited slots in the\nundefined-sentinel state.\n\nThis PR implements the fix discussed in the linked issue.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ea3e2ddd74fea3a4f1b7c98b4d42b5e3ab12f962",
      "old_mode": 33188,
      "old_path": "mypyc/codegen/emitclass.py",
      "new_id": "db94f1de9406e01606d872fbbf3c8ab339263d31",
      "new_mode": 33188,
      "new_path": "mypyc/codegen/emitclass.py"
    },
    {
      "type": "modify",
      "old_id": "64fe8126087b82d46978e61a61b2b0ea6db9ebcc",
      "old_mode": 33188,
      "old_path": "mypyc/common.py",
      "new_id": "382d640a8408316e6aa530584e00b71ceafb4800",
      "new_mode": 33188,
      "new_path": "mypyc/common.py"
    },
    {
      "type": "modify",
      "old_id": "3f95cf82c89c831948b110db1168e21a55f303cd",
      "old_mode": 33188,
      "old_path": "mypyc/irbuild/classdef.py",
      "new_id": "5bc19c961010b5369a3a270b86c8e3a621d0917e",
      "new_mode": 33188,
      "new_path": "mypyc/irbuild/classdef.py"
    },
    {
      "type": "modify",
      "old_id": "f143ce1b4402520370a0bfb5338ab753e57a77e8",
      "old_mode": 33188,
      "old_path": "mypyc/irbuild/prepare.py",
      "new_id": "8b73b10bf806464e63204a721447a532179e7cef",
      "new_mode": 33188,
      "new_path": "mypyc/irbuild/prepare.py"
    },
    {
      "type": "modify",
      "old_id": "5eda51a1a5dea9504031b204efeb52e7bc5d5b45",
      "old_mode": 33188,
      "old_path": "mypyc/irbuild/util.py",
      "new_id": "a6f793ccdc1a1a6d218c9e7e5bbfc26743942ed5",
      "new_mode": 33188,
      "new_path": "mypyc/irbuild/util.py"
    },
    {
      "type": "modify",
      "old_id": "d13bd956e12593254c9f0f90251d3ba5da38c4d4",
      "old_mode": 33188,
      "old_path": "mypyc/test-data/irbuild-classes.test",
      "new_id": "a7fdc093990090cd84170185c5e3e23c7706c910",
      "new_mode": 33188,
      "new_path": "mypyc/test-data/irbuild-classes.test"
    },
    {
      "type": "modify",
      "old_id": "ace1ab9fb1a125ddb54a654c990a996b66481151",
      "old_mode": 33188,
      "old_path": "mypyc/test-data/run-multimodule.test",
      "new_id": "e586a3cba22e993ac81aeeff84c88b79c42bbe7e",
      "new_mode": 33188,
      "new_path": "mypyc/test-data/run-multimodule.test"
    }
  ]
}
