dependabot[bot] opened a new pull request, #14960: URL: https://github.com/apache/iceberg/pull/14960
Bumps [datamodel-code-generator](https://github.com/koxudaxi/datamodel-code-generator) from 0.49.0 to 0.52.1. <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.52.1</h2> <h2>What's Changed</h2> <ul> <li>Add --validators option for Pydantic v2 field validators by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2906">koxudaxi/datamodel-code-generator#2906</a></li> <li>Add dynamic model generation support by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2901">koxudaxi/datamodel-code-generator#2901</a></li> <li>Sync zensical.toml nav with docs directory by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2908">koxudaxi/datamodel-code-generator#2908</a></li> <li>Add deprecation warning for default output-model-type by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2910">koxudaxi/datamodel-code-generator#2910</a></li> <li>Add deprecation warning and explicit --output-model-type to docs by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2911">koxudaxi/datamodel-code-generator#2911</a></li> <li>Add llms.txt generator for LLM-friendly documentation by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2912">koxudaxi/datamodel-code-generator#2912</a></li> <li>Move coverage fail_under check to combined coverage environment by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2909">koxudaxi/datamodel-code-generator#2909</a></li> <li>Fix YAML scientific notation parsing as float by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2913">koxudaxi/datamodel-code-generator#2913</a></li> <li>Add deprecated field support for Pydantic v2 by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2915">koxudaxi/datamodel-code-generator#2915</a></li> <li>Add deprecation warning for Pydantic v2 without --use-annotated by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2914">koxudaxi/datamodel-code-generator#2914</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/koxudaxi/datamodel-code-generator/compare/0.52.0...0.52.1">https://github.com/koxudaxi/datamodel-code-generator/compare/0.52.0...0.52.1</a></p> <h2>0.52.0</h2> <h2>Breaking Changes</h2> <h3>Code Generation Changes</h3> <ul> <li>Union fields with titles now wrapped in named models when <code>--use-title-as-name</code> is enabled - Previously, union-typed fields with a <code>title</code> were generated as inline union types (e.g., <code>TypeA | TypeB | TypeC | None</code>). Now they generate a separate wrapper model using the title name, and the field references this wrapper type (e.g., <code>ProcessingStatusUnionTitle | None</code>). This affects code that directly accesses union field values, as they now need to access the <code>.root</code> attribute (Pydantic v2) or <code>.__root__</code> (Pydantic v1) of the wrapper model. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2889">#2889</a>) <strong>Before:</strong> <pre lang="python"><code>class ProcessingTaskTitle(BaseModel): processing_status_union: ( ProcessingStatusDetail | ExtendedProcessingTask | ProcessingStatusTitle | None ) = Field('COMPLETED', title='Processing Status Union Title') </code></pre> <strong>After:</strong> <pre lang="python"><code>class ProcessingStatusUnionTitle(BaseModel): __root__: ( ProcessingStatusDetail | ExtendedProcessingTask | ProcessingStatusTitle ) = Field(..., title='Processing Status Union Title') class ProcessingTaskTitle(BaseModel): processing_status_union: ProcessingStatusUnionTitle | None = Field( default_factory=lambda: ProcessingStatusUnionTitle.parse_obj('COMPLETED'), title='Processing Status Union Title', ) </code></pre> </li> <li>Inline types with titles now generate named type aliases when <code>--use-title-as-name</code> is enabled - Arrays, dicts, enums-as-literals, and oneOf/anyOf unions that have a <code>title</code> in the schema now generate named type aliases or RootModel classes instead of being inlined. This improves readability but changes the generated type structure. For TypedDict output, generates <code>type MyArrayName = list[str]</code>. For Pydantic output, generates <code>class MyArrayName(RootModel[list[str]])</code>. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2889">#2889</a>)</li> <li>Default value handling changed for wrapped union fields - Fields that previously had simple default values now use <code>default_factory</code> with a lambda that calls <code>parse_obj()</code> (Pydantic v1) or <code>model_validate()</code> (Pydantic v2) to construct the wrapper model. Code that introspects field defaults will see a factory function instead of a direct value. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2889">#2889</a>)</li> <li>Different output for <code>$ref</code> with <code>nullable: true</code> - When a JSON Schema property has a <code>$ref</code> combined with only <code>nullable: true</code> (and optionally metadata like <code>title</code>/<code>description</code>), the generator now uses the referenced type directly with <code>Optional</code> annotation instead of creating a new merged model. For example, a schema with multiple properties referencing <code>User</code> with <code>nullable: true</code> will now generate <code>user_a: User | None</code> instead of creating separate <code>UserA</code>, <code>UserB</code> model classes. This is a bug fix that reduces redundant model generation, but existing code that depends on the previously generated class names will break. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2890">#2890</a>) Before: <pre lang="python"><code>class UserA(BaseModel): name: str </code></pre> </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.52.1">0.52.1</a> - 2026-01-03</h2> <h2>What's Changed</h2> <ul> <li>Add --validators option for Pydantic v2 field validators by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2906">koxudaxi/datamodel-code-generator#2906</a></li> <li>Add dynamic model generation support by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2901">koxudaxi/datamodel-code-generator#2901</a></li> <li>Sync zensical.toml nav with docs directory by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2908">koxudaxi/datamodel-code-generator#2908</a></li> <li>Add deprecation warning for default output-model-type by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2910">koxudaxi/datamodel-code-generator#2910</a></li> <li>Add deprecation warning and explicit --output-model-type to docs by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2911">koxudaxi/datamodel-code-generator#2911</a></li> <li>Add llms.txt generator for LLM-friendly documentation by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2912">koxudaxi/datamodel-code-generator#2912</a></li> <li>Move coverage fail_under check to combined coverage environment by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2909">koxudaxi/datamodel-code-generator#2909</a></li> <li>Fix YAML scientific notation parsing as float by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2913">koxudaxi/datamodel-code-generator#2913</a></li> <li>Add deprecated field support for Pydantic v2 by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2915">koxudaxi/datamodel-code-generator#2915</a></li> <li>Add deprecation warning for Pydantic v2 without --use-annotated by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/2914">koxudaxi/datamodel-code-generator#2914</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/koxudaxi/datamodel-code-generator/compare/0.52.0...0.52.1">https://github.com/koxudaxi/datamodel-code-generator/compare/0.52.0...0.52.1</a></p> <hr /> <h2><a href="https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.52.0">0.52.0</a> - 2026-01-02</h2> <h2>Breaking Changes</h2> <h3>Code Generation Changes</h3> <ul> <li>Union fields with titles now wrapped in named models when <code>--use-title-as-name</code> is enabled - Previously, union-typed fields with a <code>title</code> were generated as inline union types (e.g., <code>TypeA | TypeB | TypeC | None</code>). Now they generate a separate wrapper model using the title name, and the field references this wrapper type (e.g., <code>ProcessingStatusUnionTitle | None</code>). This affects code that directly accesses union field values, as they now need to access the <code>.root</code> attribute (Pydantic v2) or <code>.__root__</code> (Pydantic v1) of the wrapper model. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2889">#2889</a>) <strong>Before:</strong> <pre lang="python"><code>class ProcessingTaskTitle(BaseModel): processing_status_union: ( ProcessingStatusDetail | ExtendedProcessingTask | ProcessingStatusTitle | None ) = Field('COMPLETED', title='Processing Status Union Title') </code></pre> <strong>After:</strong> <pre lang="python"><code>class ProcessingStatusUnionTitle(BaseModel): __root__: ( ProcessingStatusDetail | ExtendedProcessingTask | ProcessingStatusTitle ) = Field(..., title='Processing Status Union Title') class ProcessingTaskTitle(BaseModel): processing_status_union: ProcessingStatusUnionTitle | None = Field( default_factory=lambda: ProcessingStatusUnionTitle.parse_obj('COMPLETED'), title='Processing Status Union Title', ) </code></pre> </li> <li>Inline types with titles now generate named type aliases when <code>--use-title-as-name</code> is enabled - Arrays, dicts, enums-as-literals, and oneOf/anyOf unions that have a <code>title</code> in the schema now generate named type aliases or RootModel classes instead of being inlined. This improves readability but changes the generated type structure. For TypedDict output, generates <code>type MyArrayName = list[str]</code>. For Pydantic output, generates <code>class MyArrayName(RootModel[list[str]])</code>. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2889">#2889</a>)</li> <li>Default value handling changed for wrapped union fields - Fields that previously had simple default values now use <code>default_factory</code> with a lambda that calls <code>parse_obj()</code> (Pydantic v1) or <code>model_validate()</code> (Pydantic v2) to construct the wrapper model. Code that introspects field defaults will see a factory function instead of a direct value. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2889">#2889</a>)</li> <li>Different output for <code>$ref</code> with <code>nullable: true</code> - When a JSON Schema property has a <code>$ref</code> combined with only <code>nullable: true</code> (and optionally metadata like <code>title</code>/<code>description</code>), the generator now uses the referenced type directly with <code>Optional</code> annotation instead of creating a new merged model. For example, a schema with multiple properties referencing <code>User</code> with <code>nullable: true</code> will now generate <code>user_a: User | None</code> instead of creating separate <code>UserA</code>, <code>UserB</code> model classes. This is a bug fix that reduces redundant model generation, but existing code that depends on the previously generated class names will break. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2890">#2890</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/361fb5aa6a63ae570132daee0c587e633f62da6b"><code>361fb5a</code></a> Add deprecation warning for Pydantic v2 without --use-annotated (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2914">#2914</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/69c51fdbbb60dc4c16d2a38914ab31145d2b2b7e"><code>69c51fd</code></a> Add deprecated field support for Pydantic v2 (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2915">#2915</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/b5a361ded4cd88c008b1734fef289aea11b2af63"><code>b5a361d</code></a> Fix YAML scientific notation parsing as float (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2913">#2913</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/c1682ac9e23d2a93e4bfdf9808f96b6a297769a7"><code>c1682ac</code></a> Move coverage fail_under check to combined coverage environment (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2909">#2909</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/c83470efb44281accd8b70c1561414fbbe532803"><code>c83470e</code></a> Add llms.txt generator for LLM-friendly documentation (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2912">#2912</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/e12cd96d22514860e05d840b6e8f8df94e92185c"><code>e12cd96</code></a> Add deprecation warning and explicit --output-model-type to docs (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2911">#2911</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/f2859a623cdd2ec47ebfd66d7d303533187f6c17"><code>f2859a6</code></a> Add deprecation warning for default output-model-type (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2910">#2910</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/dcc5567d751536b53d67f41053383f576d6116f3"><code>dcc5567</code></a> Sync zensical.toml nav with docs directory (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2908">#2908</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/44934cea1196d05bacb5881cf1b01b31aa058c72"><code>44934ce</code></a> Add dynamic model generation support (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2901">#2901</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/a2b2756257d88a00c52b6dd31b8c4a3db7a6b2af"><code>a2b2756</code></a> Add --validators option for Pydantic v2 field validators (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/2906">#2906</a>)</li> <li>Additional commits viewable in <a href="https://github.com/koxudaxi/datamodel-code-generator/compare/0.49.0...0.52.1">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 merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@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]
