dependabot[bot] opened a new pull request, #15319: URL: https://github.com/apache/iceberg/pull/15319
Bumps [datamodel-code-generator](https://github.com/koxudaxi/datamodel-code-generator) from 0.53.0 to 0.54.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/koxudaxi/datamodel-code-generator/releases">datamodel-code-generator's releases</a>.</em></p> <blockquote> <h2>0.54.0</h2> <h2>Breaking Changes</h2> <h3>Code Generation Changes</h3> <ul> <li>Enum member names from oneOf/anyOf const constructs now use <code>title</code> field when provided - Previously, when creating enums from <code>oneOf</code>/<code>anyOf</code> constructs with <code>const</code> values, the <code>title</code> field was incorrectly ignored and enum member names were generated using the pattern <code>{type}_{value}</code> (e.g., <code>integer_200</code>). Now, when a <code>title</code> is specified, it is correctly used as the enum member name (e.g., <code>OK</code> instead of <code>integer_200</code>). Users who have code depending on the previously generated enum member names will need to update their references. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2975">#2975</a>) Before: <pre lang="python"><code>class StatusCode(IntEnum): integer_200 = 200 integer_404 = 404 integer_500 = 500 </code></pre> After: <pre lang="python"><code>class StatusCode(IntEnum): OK = 200 Not_Found = 404 Server_Error = 500 </code></pre> </li> <li>Field names matching Python builtins are now automatically sanitized - When a field name matches a Python builtin type AND the field's type annotation uses that same builtin (e.g., <code>int: int</code>, <code>list: list[str]</code>, <code>dict: dict[str, Any]</code>), the field is now renamed with a trailing underscore (e.g., <code>int_</code>) and an alias is added to preserve the original JSON field name. This prevents Python syntax issues and shadowing of builtin types. Previously, such fields were generated as-is (e.g., <code>int: int | None = None</code>), which could cause code that shadows Python builtins. After this change, the same field becomes <code>int_: int | None = Field(None, alias='int')</code>. This affects fields named: <code>int</code>, <code>float</code>, <code>bool</code>, <code>str</code>, <code>bytes</code>, <code>list</code>, <code>dict</code>, <code>set</code>, <code>frozenset</code>, <code>tuple</code>, and other Python builtins when their type annot ation uses the matching builtin type. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2968">#2968</a>)</li> <li>$ref with non-standard metadata fields no longer triggers schema merging - Previously, when a <code>$ref</code> was combined with non-standard fields like <code>markdownDescription</code>, <code>if</code>, <code>then</code>, <code>else</code>, or other extras not in the whitelist, the generator would merge schemas and potentially create duplicate models (e.g., <code>UserWithExtra</code> alongside <code>User</code>). Now, only whitelisted schema-affecting extras (currently just <code>const</code>) trigger merging. This means: <ul> <li>Fewer merged/duplicate models will be generated</li> <li>References are preserved directly instead of being expanded</li> <li>Field types may change from inline merged types to direct references Example schema:</li> </ul> <pre lang="yaml"><code>properties: user: $ref: "#/definitions/User" nullable: true markdownDescription: "A user object" </code></pre> Before: Could generate a merged <code>UserWithMarkdownDescription</code> model After: Directly uses <code>User | None</code> reference (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2993">#2993</a>)</li> <li>Enum member names no longer get underscore suffix with <code>--capitalise-enum-members</code> - Previously, enum values like <code>replace</code>, <code>count</code>, <code>index</code> would generate <code>REPLACE_</code>, <code>COUNT_</code>, <code>INDEX_</code> when using <code>--capitalise-enum-members</code>. Now they correctly generate <code>REPLACE</code>, <code>COUNT</code>, <code>INDEX</code>. The underscore suffix is only added when <code>--use-subclass-enum</code> is also used AND the lowercase name conflicts with builtin type methods. Users relying on the previous naming (e.g., referencing <code>MyEnum.REPLACE_</code> in code) will need to update to use the new names without trailing underscores. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2999">#2999</a>)</li> <li>Fields using <code>$ref</code> with inline keywords now include merged metadata - When a schema property uses <code>$ref</code> alongside additional keywords (e.g., <code>const</code>, <code>enum</code>, <code>readOnly</code>, constraints), the generator now correctly merges metadata (description, title, constraints, defaults, readonly/writeOnly) from the referenced schema into the field definition. Previously, this metadata was lost. For example, a field like <code>type: Type</code> may now become <code>type: Type = Field(..., description='Type of this object.', title='type')</code> when the referenced schema includes those attributes. This also affects <code>additionalProperties</code> and OpenAPI parameter schemas. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2997">#2997</a>)</li> </ul> <h2>What's Changed</h2> <ul> <li>Refactor ruff check+format to use sequential subprocess calls by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2967">koxudaxi/datamodel-code-generator#2967</a></li> <li>Fix title ignored when creating enums from merging <code>allOf</code>'s or <code>anyOf</code>'s objects by <a href="https://github.com/ilovelinux"><code>@ilovelinux</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2975">koxudaxi/datamodel-code-generator#2975</a></li> <li>Fix aliased imports not applied to base classes and non-matching fields by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2981">koxudaxi/datamodel-code-generator#2981</a></li> <li>Fix handling of falsy default values for enums in set-default-enum-member option by <a href="https://github.com/kkinugasa"><code>@kkinugasa</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2977">koxudaxi/datamodel-code-generator#2977</a></li> <li>Fix use_union_operator with Python builtin type field names by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2968">koxudaxi/datamodel-code-generator#2968</a></li> <li>Support $recursiveRef/$dynamicRef in JSON Schema and OpenAPI by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2982">koxudaxi/datamodel-code-generator#2982</a></li> <li>Address review feedback for recursive/dynamic ref support by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2985">koxudaxi/datamodel-code-generator#2985</a></li> <li>Fix RecursionError in _merge_ref_with_schema for circular $ref by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2983">koxudaxi/datamodel-code-generator#2983</a></li> <li>Fix missing Field import with multiple aliases on required fields by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2992">koxudaxi/datamodel-code-generator#2992</a></li> <li>Fix patternProperties/propertyNames key constraints lost with field_constraints by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2994">koxudaxi/datamodel-code-generator#2994</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/koxudaxi/datamodel-code-generator/blob/main/CHANGELOG.md">datamodel-code-generator's changelog</a>.</em></p> <blockquote> <h2><a href="https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.54.0">0.54.0</a> - 2026-02-14</h2> <h2>Breaking Changes</h2> <h3>Code Generation Changes</h3> <ul> <li>Enum member names from oneOf/anyOf const constructs now use <code>title</code> field when provided - Previously, when creating enums from <code>oneOf</code>/<code>anyOf</code> constructs with <code>const</code> values, the <code>title</code> field was incorrectly ignored and enum member names were generated using the pattern <code>{type}_{value}</code> (e.g., <code>integer_200</code>). Now, when a <code>title</code> is specified, it is correctly used as the enum member name (e.g., <code>OK</code> instead of <code>integer_200</code>). Users who have code depending on the previously generated enum member names will need to update their references. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2975">#2975</a>) Before: <pre lang="python"><code>class StatusCode(IntEnum): integer_200 = 200 integer_404 = 404 integer_500 = 500 </code></pre> After: <pre lang="python"><code>class StatusCode(IntEnum): OK = 200 Not_Found = 404 Server_Error = 500 </code></pre> </li> <li>Field names matching Python builtins are now automatically sanitized - When a field name matches a Python builtin type AND the field's type annotation uses that same builtin (e.g., <code>int: int</code>, <code>list: list[str]</code>, <code>dict: dict[str, Any]</code>), the field is now renamed with a trailing underscore (e.g., <code>int_</code>) and an alias is added to preserve the original JSON field name. This prevents Python syntax issues and shadowing of builtin types. Previously, such fields were generated as-is (e.g., <code>int: int | None = None</code>), which could cause code that shadows Python builtins. After this change, the same field becomes <code>int_: int | None = Field(None, alias='int')</code>. This affects fields named: <code>int</code>, <code>float</code>, <code>bool</code>, <code>str</code>, <code>bytes</code>, <code>list</code>, <code>dict</code>, <code>set</code>, <code>frozenset</code>, <code>tuple</code>, and other Python builtins when their type annot ation uses the matching builtin type. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2968">#2968</a>)</li> <li>$ref with non-standard metadata fields no longer triggers schema merging - Previously, when a <code>$ref</code> was combined with non-standard fields like <code>markdownDescription</code>, <code>if</code>, <code>then</code>, <code>else</code>, or other extras not in the whitelist, the generator would merge schemas and potentially create duplicate models (e.g., <code>UserWithExtra</code> alongside <code>User</code>). Now, only whitelisted schema-affecting extras (currently just <code>const</code>) trigger merging. This means: <ul> <li>Fewer merged/duplicate models will be generated</li> <li>References are preserved directly instead of being expanded</li> <li>Field types may change from inline merged types to direct references Example schema:</li> </ul> <pre lang="yaml"><code>properties: user: $ref: "#/definitions/User" nullable: true markdownDescription: "A user object" </code></pre> Before: Could generate a merged <code>UserWithMarkdownDescription</code> model After: Directly uses <code>User | None</code> reference (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2993">#2993</a>)</li> <li>Enum member names no longer get underscore suffix with <code>--capitalise-enum-members</code> - Previously, enum values like <code>replace</code>, <code>count</code>, <code>index</code> would generate <code>REPLACE_</code>, <code>COUNT_</code>, <code>INDEX_</code> when using <code>--capitalise-enum-members</code>. Now they correctly generate <code>REPLACE</code>, <code>COUNT</code>, <code>INDEX</code>. The underscore suffix is only added when <code>--use-subclass-enum</code> is also used AND the lowercase name conflicts with builtin type methods. Users relying on the previous naming (e.g., referencing <code>MyEnum.REPLACE_</code> in code) will need to update to use the new names without trailing underscores. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2999">#2999</a>)</li> <li>Fields using <code>$ref</code> with inline keywords now include merged metadata - When a schema property uses <code>$ref</code> alongside additional keywords (e.g., <code>const</code>, <code>enum</code>, <code>readOnly</code>, constraints), the generator now correctly merges metadata (description, title, constraints, defaults, readonly/writeOnly) from the referenced schema into the field definition. Previously, this metadata was lost. For example, a field like <code>type: Type</code> may now become <code>type: Type = Field(..., description='Type of this object.', title='type')</code> when the referenced schema includes those attributes. This also affects <code>additionalProperties</code> and OpenAPI parameter schemas. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2997">#2997</a>)</li> </ul> <h2>What's Changed</h2> <ul> <li>Refactor ruff check+format to use sequential subprocess calls by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2967">koxudaxi/datamodel-code-generator#2967</a></li> <li>Fix title ignored when creating enums from merging <code>allOf</code>'s or <code>anyOf</code>'s objects by <a href="https://github.com/ilovelinux"><code>@ilovelinux</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2975">koxudaxi/datamodel-code-generator#2975</a></li> <li>Fix aliased imports not applied to base classes and non-matching fields by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2981">koxudaxi/datamodel-code-generator#2981</a></li> <li>Fix handling of falsy default values for enums in set-default-enum-member option by <a href="https://github.com/kkinugasa"><code>@kkinugasa</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2977">koxudaxi/datamodel-code-generator#2977</a></li> <li>Fix use_union_operator with Python builtin type field names by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2968">koxudaxi/datamodel-code-generator#2968</a></li> <li>Support $recursiveRef/$dynamicRef in JSON Schema and OpenAPI by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2982">koxudaxi/datamodel-code-generator#2982</a></li> <li>Address review feedback for recursive/dynamic ref support by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2985">koxudaxi/datamodel-code-generator#2985</a></li> <li>Fix RecursionError in _merge_ref_with_schema for circular $ref by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2983">koxudaxi/datamodel-code-generator#2983</a></li> <li>Fix missing Field import with multiple aliases on required fields by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2992">koxudaxi/datamodel-code-generator#2992</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/2ea62449515940d2af05e0723f8db2fd1b3cc11e"><code>2ea6244</code></a> Fix incorrect relative imports with --use-exact-imports and --collapse-root-m...</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/34b7d29a52765b2c6f3da920bc525bf37f0db624"><code>34b7d29</code></a> fix codespeed python version (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3000">#3000</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/f3ef9c619a010ed4a30c2f7f6b514053f251a8e2"><code>f3ef9c6</code></a> Fix merged result in parse_item not passed back to parse_object_fields (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2997">#2997</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/501190398d5717a936301f550b61ecec520c8cb7"><code>5011903</code></a> Fix extra underscore on enum members like replace with --capitalise-enum-memb...</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/907a1a8cec66c4e25ef5dfe2128d131a5a9811f2"><code>907a1a8</code></a> Fix exact imports with module/class name collision (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2998">#2998</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/2b659f001e744e1e95e464ab0d613fae0122bc01"><code>2b659f0</code></a> Fix missing | None for nullable enum literals in TypedDict (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2991">#2991</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/992af20312420a2d8b8975fb9ee6e22430f5144f"><code>992af20</code></a> Fix type loss when $ref is used with non-standard metadata fields (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2993">#2993</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/0f1bc0f41d758cfda02d4438cdbbd3c3b4265102"><code>0f1bc0f</code></a> Fix patternProperties/propertyNames key constraints lost with field_constrain...</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/24b576e5e514802f45fbfc39af29f6d53a983e49"><code>24b576e</code></a> Fix missing Field import with multiple aliases on required fields (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2992">#2992</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/b58970a43c51805241fd93ce54deb23f2391052f"><code>b58970a</code></a> Fix RecursionError in _merge_ref_with_schema for circular $ref (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2983">#2983</a>)</li> <li>Additional commits viewable in <a href="https://github.com/koxudaxi/datamodel-code-generator/compare/0.53.0...0.54.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
